Bug 34393

Summary: Cancel button of search input field does not fire input event
Product: WebKit Reporter: Steven Brown <StevenGBrown>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: adele, arv, joepeck, StevenGBrown, tkent
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Search field input events
none
Patch
none
Patch none

Description Steven Brown 2010-01-31 04:28:35 PST
Created attachment 47791 [details]
Search field input events

All other changes to the text of a type="search" input field trigger an input event (inserting or deleting characters, pasting into the field, spell-checker corrections, etc), but clicking on the cancel button within the field does not.

The attached file "searchfield.html" demonstrates this: it contains a search field and logs all input events fired from that search field.

Reproduced in Google Chrome 4.0.249.78 and Safari 4.0.4 (531.21.10).
Comment 1 Alexey Proskuryakov 2010-01-31 11:36:42 PST
Confirmed with r54103.
Comment 2 Joseph Pecoraro 2010-04-18 23:20:12 PDT
Also, potentially related, if you mousedown on the cancel button, and mouseup on the cancel button the mousedown event will fire, but the mouseup event will not fire.
Comment 3 Alexey Proskuryakov 2010-04-20 16:40:31 PDT
See also: bug 37789.
Comment 4 Kent Tamura 2010-07-16 01:20:20 PDT
Created attachment 61776 [details]
Patch
Comment 5 Erik Arvidsson 2010-07-16 09:18:54 PDT
Comment on attachment 61776 [details]
Patch


> +++ b/LayoutTests/fast/forms/script-tests/search-cancel-button-events.js
> @@ -0,0 +1,37 @@
> +description('Test for the spin control behavior in a type=numnber input.');

The description needs update.
Comment 6 Kent Tamura 2010-07-16 09:57:30 PDT
Created attachment 61818 [details]
Patch
Comment 7 Ojan Vafai 2010-07-22 16:21:22 PDT
Comment on attachment 61818 [details]
Patch

We should clearly be firing the input event here. Whether we should fire an explicit cancel event is another question. It's not needed in my opinion.
Comment 8 Kent Tamura 2010-07-22 17:43:43 PDT
Comment on attachment 61818 [details]
Patch

Clearing flags on attachment: 61818

Committed r63929: <http://trac.webkit.org/changeset/63929>
Comment 9 Kent Tamura 2010-07-22 17:43:51 PDT
All reviewed patches have been landed.  Closing bug.