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

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 2756483005: Merge "INPUT element: Implicit form submission should reset setTextAsOfLastFormControlChangeEvent e… (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/text/text-change-event-after-clear-in-submit.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index c0e840469d0fd5d7de2f2aa0f7428c810eae0d31..ac1848f30d1bd82d50e8a1473f3a34ebd778c0e8 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -1265,12 +1265,12 @@ void HTMLInputElement::defaultEventHandler(Event* evt) {
HTMLFormElement* formForSubmission = m_inputTypeView->formForSubmission();
// Form may never have been present, or may have been destroyed by code
// responding to the change event.
- if (formForSubmission) {
+ if (formForSubmission)
formForSubmission->submitImplicitly(evt, canTriggerImplicitSubmission());
- // We treat implicit submission is something like blur()-then-focus(). So
- // we reset the last value. crbug.com/695349.
- setTextAsOfLastFormControlChangeEvent(value());
- }
+
+ // We treat implicit submission is something like blur()-then-focus(). So
+ // we reset the last value. crbug.com/695349 and crbug.com/700842.
+ setTextAsOfLastFormControlChangeEvent(value());
evt->setDefaultHandled();
return;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/text/text-change-event-after-clear-in-submit.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698