Hiding a select element suppresses pending change event
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
People
(Reporter: desmond.allan.schmidt, Unassigned)
References
Details
Attachments
(1 file)
|
879 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
I wanted a dropdown menu for a toolbar composed of a button and a select menu. The select menu would appear directly below the button when it was clicked, then the user would choose a value, and the select menu would hide itself again. This was achieved with a) a click-handler on the button which un-hides the select menu b) a mouseup event handler on the select menu which hides the menu when any option is selected and c) a change event handler also attached to the select menu. The mouseup event fires, hiding the select menu, and in the case of a new value being selected a change event should also be fired, to be picked up subsequently by the change event handler. Since change is undetectable in the mouseup handler a separate change handler is needed.
Actual results:
The change event is never fired even when the value differs from the old one. Removing the hiding in the mouseup handler restores the change event, so it is the hiding, either with display:none or visibility:hidden that causes the problem.
Expected results:
In Chrome and Opera this works correctly: the change event is fired because the select menu has changed. Merely hiding a select should not kill pending change events. Version 85 is the latest version on Linux.
| Reporter | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
| Reporter | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Thanks for reporting this issue. Could reproduce it on Ubuntu 18.04 with current Nightly.
Updated•5 years ago
|
Description
•