Closed
Bug 269770
Opened 20 years ago
Closed 1 month ago
Form submission fails and onSubmit fired, if still loading
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: harunaga, Unassigned)
References
()
Details
If we click submit button while the page is still loading, the form
submission (sometimes) fails and onSubmit event handler is fired.
Testcase:
<SCRIPT type="text/JavaScript">
var submit_flag = false;
function onSubmit()
{
if (submit_flag == true)
{
return false;
}
submit_flag = true;
return true;
}
</SCRIPT>
<FORM onSubmit="if (onSubmit() == false) { return false; }" method="get"
action="example.html">
<INPUT type="submit">
</FORM>
Steps to reproduce:
1. Set security.warn_submit_insecure as false (to be able to reproduce
this easily)
2. Load the URL and save as "example.html".
3. Open the file, and repeat clicking the button as quickly as possible.
Actual Result:
in the meatimetime, the button becomes to do nothing.
JavaScript Debugger shows that "submit_flag" is true.
So onSubmit event handler has been fired.
Expected Result:
When a form isn't submitted, onSubmit event handler should not be fired.
Or when onSubmit is fired, the form should be submitted unless onSubmit
returns false.
Confirmed with current-cvs/FreeBSD and 2004111207-trunk/Mac.
IE 6.0 doesn't have this problem.
Comment 1•19 years ago
|
||
I'd like form submission password population to take priority over loading the page completely. It appears that automatic form population waits until the page is loaded before the password is populated.
Comment 2•19 years ago
|
||
I'd like form submission password population to take priority over loading the page completely. It appears that automatic form population waits until the page is loaded before the password is populated. This is especially noticeable on a slower connection.
Comment 3•15 years ago
|
||
It is now 2009 with FF 3.5.x and this problem still exist? All that is required to fire the form submission is a password field and hitting enter. You don;t need a submit button nor returning FALSE on a OnSubmit() handler will negate the submission. This is wrong behavior.
Comment 4•15 years ago
|
||
In response to Steve's 2006 comment. This is exactly what I am seeing, a password field takes precedence over javascript logic control. Why is this not fixed after 3 years?
Updated•15 years ago
|
Assignee: form-submission → nobody
QA Contact: form-submission
Comment 5•11 years ago
|
||
WFM on: Mozilla/5.0 (X11; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0 Can anyone still reproduce this issue?
Flags: needinfo?(harunaga)
Keywords: qawanted
Updated•11 years ago
|
Flags: needinfo?(sherfh)
Updated•11 years ago
|
Flags: needinfo?(sant9442)
| Assignee | ||
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
Updated•5 years ago
|
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
Comment 6•1 month ago
|
||
The STRs are no longer valid; e.g. security.warn_submit_insecure is no longer used in the code base.
Please file a new bug with new STRs. Thanks.
Status: NEW → RESOLVED
Closed: 1 month ago
Flags: needinfo?(sherfh)
Flags: needinfo?(sant9442)
Flags: needinfo?(harunaga)
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•