Bug 16886 - Safari submits forms with disabled submit buttons
Summary: Safari submits forms with disabled submit buttons
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 39021
  Show dependency treegraph
Reported: 2008-01-15 14:54 PST by Mathew Harrison
Modified: 2010-05-22 10:49 PDT (History)
4 users (show)

See Also:

test case (254 bytes, text/html)
2008-01-16 11:37 PST, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mathew Harrison 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.

		<form method="post" action="nonpage.html">
			<input type="text">
			<input type="submit" value="This is disabled" DISABLED/>
Comment 1 Alexey Proskuryakov 2008-01-16 11:35:13 PST
See also: bug 9756.
Comment 2 Alexey Proskuryakov 2008-01-16 11:37:26 PST
Created attachment 18478 [details]
test case

Same test as an attachment.
Comment 3 Alexey Proskuryakov 2008-01-16 11:38:17 PST
Confirmed with r29531.
Comment 4 David Kilzer (:ddkilzer) 2008-01-18 13:36:52 PST
What do MSIE and Firefox do in this case?
Comment 5 Mathew Harrison 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.
Comment 6 mitz 2008-01-18 14:15:10 PST
What if there are multiple submit buttons?
Comment 7 Alexey Proskuryakov 2008-02-04 00:24:18 PST
See also: bug 9756.
Comment 8 leppie 2008-03-26 06:20:04 PDT
<a href="..." id="sumLink" disabled="disabled">Foo</a>

Is NOT disabled.
Comment 9 Gérard Talbot 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.
Comment 10 Dimitri Glazkov (Google) 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