RESOLVED WONTFIX Bug 16886
Safari submits forms with disabled submit buttons
https://bugs.webkit.org/show_bug.cgi?id=16886
Summary Safari submits forms with disabled submit buttons
Mathew Harrison
Reported 2008-01-15 14:54:11 PST
Simple code example. Even with submit button disabled, Safari will submit the form when pressing the return/enter key. Button is disabled for mouse clicks. <html> <body> <form method="post" action="nonpage.html"> <input type="text"> <input type="submit" value="This is disabled" DISABLED/> </form> </body> </html>
Attachments
test case (254 bytes, text/html)
2008-01-16 11:37 PST, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2008-01-16 11:35:13 PST
See also: bug 9756.
Alexey Proskuryakov
Comment 2 2008-01-16 11:37:26 PST
Created attachment 18478 [details] test case Same test as an attachment.
Alexey Proskuryakov
Comment 3 2008-01-16 11:38:17 PST
Confirmed with r29531.
David Kilzer (:ddkilzer)
Comment 4 2008-01-18 13:36:52 PST
What do MSIE and Firefox do in this case?
Mathew Harrison
Comment 5 2008-01-18 13:47:47 PST
(In reply to comment #4) > What do MSIE and Firefox do in this case? > MSIE submits the form in the case of one text input. If you have two text inputs and a disabled submit, MSIE will not submit the form. Firefox will not submit the form if the submit input is disabled. Safari will submit the form with multiple text inputs and a disabled submit button.
mitz
Comment 6 2008-01-18 14:15:10 PST
What if there are multiple submit buttons?
Alexey Proskuryakov
Comment 7 2008-02-04 00:24:18 PST
See also: bug 9756.
leppie
Comment 8 2008-03-26 06:20:04 PDT
<a href="..." id="sumLink" disabled="disabled">Foo</a> Is NOT disabled.
Gérard Talbot (no longer involved)
Comment 9 2008-08-31 17:11:56 PDT
> <a href="..." id="sumLink" disabled="disabled">Foo</a> is invalid markup code. People of this bug should visit bug 14443 : Forms dont submit when disabling submit button which is the exact opposite summary of this bug.
Dimitri Glazkov (Google)
Comment 10 2010-05-12 16:13:33 PDT
We match IE in this case, for consistency with other edge cases. See bug 9756 for more information
Erik Ostrom
Comment 11 2023-06-26 09:23:47 PDT
Although the 2010 outcome was WONTFIX, I believe this behavior was changed in https://bugs.webkit.org/show_bug.cgi?id=243594. Mentioning it here because this bug still turns up in Google results.
Note You need to log in before you can comment on or make changes to this bug.