Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Issue 313013005: Set value of m_textAsOfLastFormControlChangeEvent before triggering change event (Closed)

Created:
6 years, 6 months ago by Habib Virji
Modified:
6 years, 6 months ago
Reviewers:
keishi, tkent
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Set value of m_textAsOfLastFormControlChangeEvent before triggering change event Value updated inside change event, get overwritten by setTextAsOfLastFormControlChangeEvent. New value if similar to previous value was not triggering change event. R=tkent, keishi BUG=378871 TEST=OnChange event should be fired, when value is changed inside change handler and same text is re-entered. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175565

Patch Set 1 #

Total comments: 9

Patch Set 2 : Updated as per code review comments #

Patch Set 3 : Changed test, to check strings output and keep count of change counter #

Total comments: 4

Patch Set 4 : Code review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -1 line) Patch
A LayoutTests/fast/events/onchange-js.html View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/fast/events/onchange-js-expected.txt View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTextFormControlElement.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
Habib Virji
This patch fixes the issue with the value changed inside the change event handler. Scenario ...
6 years, 6 months ago (2014-06-04 10:17:27 UTC) #1
keishi
https://codereview.chromium.org/313013005/diff/1/LayoutTests/fast/events/onchange-js.html File LayoutTests/fast/events/onchange-js.html (right): https://codereview.chromium.org/313013005/diff/1/LayoutTests/fast/events/onchange-js.html#newcode14 LayoutTests/fast/events/onchange-js.html:14: log('change event fired'); nit: inconsistent string literal quotes. You ...
6 years, 6 months ago (2014-06-04 20:43:53 UTC) #2
keishi
https://codereview.chromium.org/313013005/diff/1/LayoutTests/fast/events/onchange-js.html File LayoutTests/fast/events/onchange-js.html (right): https://codereview.chromium.org/313013005/diff/1/LayoutTests/fast/events/onchange-js.html#newcode3 LayoutTests/fast/events/onchange-js.html:3: <input id="input" type="text" onchange="changeHandler()"></input> nit: input doesn't need end ...
6 years, 6 months ago (2014-06-04 21:26:21 UTC) #3
Habib Virji
@kieshi: What I wanted to simulate is user input and when out of focus, change ...
6 years, 6 months ago (2014-06-05 08:43:22 UTC) #4
keishi
https://codereview.chromium.org/313013005/diff/1/LayoutTests/fast/events/onchange-js.html File LayoutTests/fast/events/onchange-js.html (right): https://codereview.chromium.org/313013005/diff/1/LayoutTests/fast/events/onchange-js.html#newcode28 LayoutTests/fast/events/onchange-js.html:28: document.execCommand("InsertText", false, "foo bar baz"); On 2014/06/05 08:43:23, Habib ...
6 years, 6 months ago (2014-06-05 09:02:16 UTC) #5
Habib Virji
Thanks Keishi, I have updated test to now check strings at all points. Last changeEventCounter ...
6 years, 6 months ago (2014-06-05 09:33:30 UTC) #6
keishi
LGTM https://codereview.chromium.org/313013005/diff/40001/LayoutTests/fast/events/onchange-js.html File LayoutTests/fast/events/onchange-js.html (right): https://codereview.chromium.org/313013005/diff/40001/LayoutTests/fast/events/onchange-js.html#newcode15 LayoutTests/fast/events/onchange-js.html:15: input.value = ""; nit: only place using double ...
6 years, 6 months ago (2014-06-05 09:42:01 UTC) #7
Habib Virji
Thanks Keishi. Done. https://codereview.chromium.org/313013005/diff/40001/LayoutTests/fast/events/onchange-js.html File LayoutTests/fast/events/onchange-js.html (right): https://codereview.chromium.org/313013005/diff/40001/LayoutTests/fast/events/onchange-js.html#newcode15 LayoutTests/fast/events/onchange-js.html:15: input.value = ""; On 2014/06/05 09:42:02, ...
6 years, 6 months ago (2014-06-05 10:18:14 UTC) #8
Habib Virji
The CQ bit was checked by habib.virji@samsung.com
6 years, 6 months ago (2014-06-05 10:18:20 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/habib.virji@samsung.com/313013005/60001
6 years, 6 months ago (2014-06-05 10:19:03 UTC) #10
commit-bot: I haz the power
6 years, 6 months ago (2014-06-05 12:52:41 UTC) #11
Message was sent while issue was closed.
Change committed as 175565

Powered by Google App Engine
This is Rietveld 408576698