Open Bug 1348277 Opened 3 years ago Updated 3 years ago
onchange event is not fired going through <select> and when ESC key is clicked
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 Build ID: 20170301181722 Steps to reproduce: I have a select list with 4 options and using tab + up/down keys selecting one of the 4 options in the list and clicking ESC key. This is tried on my laptop Firefox browser. You can see my test case example in following URL. https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onchange Actual results: onchange event is not fired. Expected results: onchange event should have been fired. Instead of ESC key if I press ENTER key onchange event is fired. Onchange event is fired on clicking ESC key in other browsers like Chrome and IE11. Expecting similar functionality in Firefox too.
onchange event is fired each time press up/down keys, in Fx52.0.
Component: Untriaged → DOM: Events
Product: Firefox → Core
(In reply to YF (Yang) from comment #1) > onchange event is fired each time press up/down keys, in Fx52.0. And, as far as I know, that shouldn't happen. For years, Firefox has been the only major browser to correctly implement the onchange event, specifically when related to keyboard interaction. I see something has changed between Firefox 48 and 49, will open a new ticket. from MDN: https://developer.mozilla.org/en-US/docs/Web/Events/change ... For example, keyboard navigation in <select> elements never fires a change event in Gecko until the user hits Enter or switches the focus away from the <select> (see bug 126379).
Olli would probably have reviewed any recent changes here.
Now I'm lost what this bug is about. About the initial comment or comment 1 and comment 2. Has ESC ever caused change event? Or is this a recent regression?
Flags: needinfo?(bugs) → needinfo?(praveenkumar.jv)
About my previous comment (2) I've submitted a separate ticket, see https://bugzilla.mozilla.org/show_bug.cgi?id=1350700. Sorry for the confusion :)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.