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+

Sam Bauers
Reported 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)
Attachments
Reduced testcase for this bug (843 bytes, text/html)
2007-05-24 08:31 PDT, Sam Bauers
no flags
Updated m_lastOnChangeIndex before dispatching the change event to avoid reentrancy (4.06 KB, patch)
2007-05-24 13:38 PDT, mitz
adele: review+
Sam Bauers
Comment 1 2007-05-24 08:31:07 PDT
Created attachment 14705 [details] Reduced testcase for this bug Test case contains basic instructions for reproducing bug
mitz
Comment 2 2007-05-24 13:38:13 PDT
Created attachment 14706 [details] Updated m_lastOnChangeIndex before dispatching the change event to avoid reentrancy
Sam Weinig
Comment 3 2007-05-24 16:30:10 PDT
Landed in r21734.
Sam Bauers
Comment 4 2007-05-24 21:46:45 PDT
Fixed in ten hours!?!?! Are you guys trying to break some kind of speed record?
Note You need to log in before you can comment on or make changes to this bug.