Summary: | Change event is not fired for input[type=number] when the user reverts a change made by script | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
Component: | Forms | Assignee: | Ryosuke Niwa <rniwa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | darin, dglazkov, morrita, tkent, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 67360 | ||||||||
Attachments: |
|
Description
Ryosuke Niwa
2011-09-06 22:59:49 PDT
Created attachment 106546 [details]
fixes the bug
Comment on attachment 106546 [details]
fixes the bug
Looks good. Thank you!
Comment on attachment 106546 [details] fixes the bug Attachment 106546 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9602458 New failing tests: fast/forms/input-number-events.html (In reply to comment #3) > New failing tests: > fast/forms/input-number-events.html The failure was: @@ -15,7 +15,7 @@ PASS changeEventCounter is 0 PASS inputEventCounter is 1 Focus on another field -PASS changeEventCounter is 1 +FAIL changeEventCounter should be 1. Was 0. PASS inputEventCounter is 1 PASS successfullyParsed is true 'change' was not fired when the number input lost focus after updating the value by the spin button. HTMLInputElement::stepUpFromRenderer() uses setValueAsNumber() internally. So m_wasModifiedByUser and m_textAsOfLastFormControlChangeEvent are always reset. Created attachment 106558 [details]
fixed the test failure
(In reply to comment #4) > (In reply to comment #3) > > New failing tests: > > fast/forms/input-number-events.html > > The failure was: > @@ -15,7 +15,7 @@ > PASS changeEventCounter is 0 > PASS inputEventCounter is 1 > Focus on another field > -PASS changeEventCounter is 1 > +FAIL changeEventCounter should be 1. Was 0. > PASS inputEventCounter is 1 > PASS successfullyParsed is true > > 'change' was not fired when the number input lost focus after updating the value by the spin button. > HTMLInputElement::stepUpFromRenderer() uses setValueAsNumber() internally. So m_wasModifiedByUser and m_textAsOfLastFormControlChangeEvent are always reset. Yeah, I completely overlooked this failure. New patch fixes this issue by propagating sendChangeEvent through various functions from stepUpFromRenderer. Comment on attachment 106558 [details]
fixed the test failure
Looks good.
(In reply to comment #7) > (From update of attachment 106558 [details]) > Looks good. Thanks for the review :D Comment on attachment 106558 [details] fixed the test failure Clearing flags on attachment: 106558 Committed r94658: <http://trac.webkit.org/changeset/94658> All reviewed patches have been landed. Closing bug. |