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

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

Issue 2716773002: INPUT element: Implicit form submission should reset setTextAsOfLastFormControlChangeEvent. (Closed)
Patch Set: Created 3 years, 10 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 aeeb8785a2b51fbd6b95bea94070fe3c95757245..50a1339357703f5e0f14174311590e91ccf3d44f 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -1265,8 +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());
+ }
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