Bug 13857

Summary: REGRESSION: onChange function applied to select element executes twice when focus is set
Product: WebKit Reporter: Sam Bauers <sam>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major CC: mitz
Priority: P1 Keywords: HasReduction, Regression
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Reduced testcase for this bug
none
Updated m_lastOnChangeIndex before dispatching the change event to avoid reentrancy adele: review+

Description Sam Bauers 2007-05-24 08:29:36 PDT
When a javascript function is called via an onchange event on a select form element, if the function attempts to set the focus to any other DOM element then the function is run again.

This is best explained in practice by the reduction that follows.

This has been occurring only in the most recent nightly builds (currently running revision 21682)
Comment 1 Sam Bauers 2007-05-24 08:31:07 PDT
Created attachment 14705 [details]
Reduced testcase for this bug

Test case contains basic instructions for reproducing bug
Comment 2 mitz 2007-05-24 13:38:13 PDT
Created attachment 14706 [details]
Updated m_lastOnChangeIndex before dispatching the change event to avoid reentrancy
Comment 3 Sam Weinig 2007-05-24 16:30:10 PDT
Landed in r21734.
Comment 4 Sam Bauers 2007-05-24 21:46:45 PDT
Fixed in ten hours!?!?! Are you guys trying to break some kind of speed record?