Index: third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
index 53b47e973450e2b06b2e9d55df92b5d233e12752..760b1adc9e0e36f73e07a62f863d3f53b2407d3b 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
@@ -350,9 +350,11 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton) |
LocalFrame* frame = document().frame(); |
if (!view || !frame || !frame->page()) |
return; |
- // See crbug.com/586749. |
+ |
+ // Do not submit if the form is not attached to the document. |
+ // This matches the behaviour in fireFox. |
iclelland
2016/08/23 17:46:23
Nit: "Firefox"
Also, you could put a reference to
lunalu1
2016/08/24 15:24:42
Done.
|
if (!isConnected()) |
- UseCounter::count(document(), UseCounter::FormSubmissionNotInDocumentTree); |
+ return; |
if (m_isSubmitting) |
return; |