Bug 11402 - REGRESSION: onChange does not work anymore for 1st item in popup
Summary: REGRESSION: onChange does not work anymore for 1st item in popup
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
Keywords: HasReduction, InRadar, Regression
Depends on:
Reported: 2006-10-24 09:28 PDT by David Scheck
Modified: 2006-11-05 00:44 PST (History)
3 users (show)

See Also:

Testcase (167 bytes, text/html)
2006-10-24 18:22 PDT, Matt Lilek
no flags Details
proposed fix (1.45 KB, patch)
2006-11-04 05:09 PST, Alexey Proskuryakov
harrison: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Scheck 2006-10-24 09:28:59 PDT
Something broke and now my popup boxes that have an onChange are not executing the onChange when you switch to the first item in the popup.
It still works with Safari and Firefox.
Comment 1 mitz 2006-10-24 10:23:22 PDT
I couldn't reproduce with<select onchange="alert()"><option>1</option><option>2</option><option>3</option></select>
i.e. the alert showed up every time.
Can you provide a test case?
Comment 2 Matt Lilek 2006-10-24 18:18:51 PDT
Confirming this bug.  It only happens when the first option is not the default.
Comment 3 Matt Lilek 2006-10-24 18:22:28 PDT
Created attachment 11198 [details]

Testcase using Mitz's code from above.  The second option is selected when the page loads, selecting 1 does not fire the alert on the first selection of 1, selecting 2 or 3 then selecting 1 again does fire the alert.
Comment 4 Alexey Proskuryakov 2006-10-24 21:31:19 PDT
Fixing keywords/component/priority/severity (blocker is for bugs that block WebKit development).
Comment 5 Matt Lilek 2006-10-27 18:07:22 PDT
Filed in radar as 4808112
Comment 6 Alexey Proskuryakov 2006-11-04 05:09:38 PST
Created attachment 11378 [details]
proposed fix

I do not see how to make an automated test (AFAICT onchange only fires for mouse actions, and only when the popup menu is actually opened, and DRT doesn't seem to be able to simulate this) - and I'm not sure if adding a manual test is worth it in this case.
Comment 7 David Harrison 2006-11-04 13:59:45 PST
Comment on attachment 11378 [details]
proposed fix

Comment 8 Alexey Proskuryakov 2006-11-05 00:44:57 PST
Committed revision 17603.