This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18391 - "If target browsing context was created in the previous step, or if the form document has not yet completely loaded, then let replace be true. Otherwise, let it be false." - this is wrong in the context of user initiated submits. No browser I've tested wi
Summary: "If target browsing context was created in the previous step, or if the form ...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-25 08:46 UTC by contributor
Modified: 2012-12-30 04:15 UTC (History)
3 users (show)

See Also:


Attachments
Attempted testcase/demo (649 bytes, text/html)
2012-10-02 20:40 UTC, Daniel Bratell
Details

Description contributor 2012-07-25 08:46:25 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#sandboxSubmitBlocked
Complete: http://www.whatwg.org/c#sandboxSubmitBlocked

Comment:
"If target browsing context was created in the previous step, or if the form
document has not yet completely loaded, then let replace be true. Otherwise,
let it be false." - this is wrong in the context of user initiated submits. No
browser I've tested with (Opera, Chrome, Firefox) replaces the current
document if you submit the form manually before the current page has completed
loading. This should probably be limited to just automatic form submits.

Posted from: 2001:4c28:a030:30:99e1:e72f:ece9:92b5
User agent: Opera/9.80 (Windows NT 6.1; WOW64; U; en) Presto/2.10.289 Version/12.00
Comment 1 Ian 'Hixie' Hickson 2012-10-02 19:40:37 UTC
Do you have a test case?
Comment 2 Daniel Bratell 2012-10-02 20:40:25 UTC
Created attachment 1197 [details]
Attempted testcase/demo

Added a testcase "slowloading.html" but it's not very good since it's hard to ensure that the page loads slowly enough that the tester has time to click "submit" before the page completed loading. Apart from that the testcase is just:

<body>
Click on "SUBMIT" before this page has completely loaded and then go back in the browser.<br>
PASS if you see this page when going back.<br>
FAIL if you return to the page before this or if you can't see another page.<br>

<form action="data:text/html,Now click back"><input type="submit"></form>
Comment 3 Ian 'Hixie' Hickson 2012-12-30 04:13:35 UTC
Ok, I've changed the spec to only do this if the form is submitted via submit(). Note that this means it doesn't happen on submitButton.click() submissions. We'll see if that's a problem, I guess.
Comment 4 contributor 2012-12-30 04:15:35 UTC
Checked in as WHATWG revision r7610.
Check-in comment: Make submissions during page load not triggered by the submit() method not replace the current page.
http://html5.org/tools/web-apps-tracker?from=7609&to=7610