LayoutTests:
Reviewed by Beth Dakin.
Tests for the change and blur events in input elements.
* fast/events/onchange-passwordfield-expected.txt: Added.
* fast/events/onchange-passwordfield.html: Added.
* fast/events/onchange-searchfield-expected.txt: Added.
* fast/events/onchange-searchfield.html: Added.
* fast/events/onchange-textfield-expected.txt: Added.
* fast/events/onchange-textfield.html: Added.
WebCore:
Reviewed by Beth Dakin.
Fixed <rdar://problem/4870551> 9A320: <input type="text"> no longer
dispatches onchange event in response to enter key
To match our old behavior and FF, we need to dispatch onchange in response to the
ENTER key. The strategy here is just to dispatch a blur event, since that's how
the search field always worked, and the DOM spec says onchange only fires
as a precursor to blur.
* ChangeLog:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed