[Webkit-unassigned] [Bug 109720] onChange Fires Twice if Focus Changed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 15 00:59:38 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=109720
Alexander Shalamov <alexander.shalamov at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|webkit-unassigned at lists.web |alexander.shalamov at gmail.co
|kit.org |m
CC| |alexander.shalamov at gmail.co
| |m
--- Comment #4 from Alexander Shalamov <alexander.shalamov at gmail.com> 2013-03-15 01:02:04 PST ---
Two change events are fired in same call chain.
First is sent when linebreak is inserted.
Second event is sent when onchange event handler is called and old element is unfocused.
Reordering change event dispatching and state saving fixes the problem,
but I'm not sure if that is the best solution.
Alexey, what do you think?
void HTMLTextFormControlElement::dispatchFormControlChangeEvent()
{
if (m_textAsOfLastFormControlChangeEvent != value()) {
HTMLElement::dispatchChangeEvent();
setTextAsOfLastFormControlChangeEvent(value());
}
setChangedSinceLastFormControlChangeEvent(false);
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list