RESOLVED FIXED 76244
REGRESSION(r100111): A 'change' event does not fire when a mouse drag occurs to switch elements in a listbox
https://bugs.webkit.org/show_bug.cgi?id=76244
Summary REGRESSION(r100111): A 'change' event does not fire when a mouse drag occurs ...
Kent Tamura
Reported 2012-01-12 21:16:15 PST
Reported at http://code.google.com/p/chromium/issues/detail?id=110068. <select id="sel1" size="4" onchange="alert('event fired: ' + document.getElementById('sel1').value);"> <option>RED</option> <option>GREEN</option> <option>BLUE</option> <option>YELLOW</option> </select> If you select an option by mouse dragging (not clicking), 'change' event doesn't fire. This problem was made by r99667 or r100111.
Attachments
Patch (6.02 KB, patch)
2012-01-17 22:35 PST, Kent Tamura
no flags
Patch for landing (6.71 KB, patch)
2012-01-18 18:30 PST, Kent Tamura
no flags
Kent Tamura
Comment 1 2012-01-17 20:43:22 PST
The root cause is that the mousedown handling in listBoxDefaultEventHandler() updates m_lastOnChangeSelection. If the listbox is scrollable, mousemove events are not dispatched.
Kent Tamura
Comment 2 2012-01-17 22:35:18 PST
Hajime Morrita
Comment 3 2012-01-17 22:51:58 PST
Comment on attachment 122874 [details] Patch The test shows the evidence.
Kent Tamura
Comment 4 2012-01-17 23:09:15 PST
(In reply to comment #1) > The root cause is that the mousedown handling in listBoxDefaultEventHandler() updates m_lastOnChangeSelection. If the listbox is scrollable, mousemove events are not dispatched. Correction: mousedown -> mousemove BTW, HTMLSelectElement has multiple functions to update option selection, and they are confusing. We had better refactor/rename/document them.
WebKit Review Bot
Comment 5 2012-01-17 23:27:33 PST
Comment on attachment 122874 [details] Patch Attachment 122874 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11282082 New failing tests: fast/forms/select-multiple-elements-with-mouse-drag-with-options-less-than-size.html
Kent Tamura
Comment 6 2012-01-18 02:21:28 PST
(In reply to comment #5) > (From update of attachment 122874 [details]) > Attachment 122874 [details] did not pass chromium-ews (chromium-xvfb): > Output: http://queues.webkit.org/results/11282082 > > New failing tests: > fast/forms/select-multiple-elements-with-mouse-drag-with-options-less-than-size.html The test didn't fail on Apple Mac and Chromium Mac with the patch.
Kent Tamura
Comment 7 2012-01-18 18:30:52 PST
Created attachment 123050 [details] Patch for landing
WebKit Review Bot
Comment 8 2012-01-18 22:52:12 PST
Comment on attachment 123050 [details] Patch for landing Clearing flags on attachment: 123050 Committed r105386: <http://trac.webkit.org/changeset/105386>
WebKit Review Bot
Comment 9 2012-01-18 22:52:17 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.