Select popup shows up on keydown even when event is default prevented.
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox72 | --- | fixed |
People
(Reporter: marioposilva, Assigned: emilio)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
Focus hidden tag select and press spacebar key.
(Select css:
select {
position: absolute;
bottom: 0;
left: 50%;
display: inline-block;
width: 0;
height: 0;
padding: 0;
opacity: 0;
border: none;
overflow:hidden;
}
)
Actual results:
The hidden select shows the dropdown options.
Expected results:
Dropdown options should remain hidden.
Comment 1•6 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
| Assignee | ||
Comment 2•6 years ago
|
||
Could you attach an HTML page that shows the bug? Also why is this the expected result? If it is focusable, I'd expect the user to be able to use it.
| Reporter | ||
Comment 3•6 years ago
|
||
| Reporter | ||
Comment 4•6 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
Could you attach an HTML page that shows the bug? Also why is this the expected result? If it is focusable, I'd expect the user to be able to use it.
You can test it on Chrome and Firefox, in Chrome, if you press TAB > Spacebar, it will open the masked dropdown and won't show the native dropdown.
When doing it on Firefox, it will show the native dropdown.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 5•6 years ago
|
||
Ah, cool, so the issue is that we show the dropdown even if you call e.preventDefault(). I agree that's a bug, but it doesn't have to do with being hidden or not :)
| Assignee | ||
Comment 6•6 years ago
|
||
So a reduced test-case would be: data:text/html,<select onkeydown="return false"><option>Foo</option><option>Bar</option></select>.
That doesn't show the dropdown in other browsers, but it does in Firefox.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 7•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 9•6 years ago
|
||
| bugherder | ||
Description
•