Bug 16886

Summary: Safari submits forms with disabled submit buttons
Product: WebKit Reporter: Mathew Harrison <mhharrison>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: akeerthi, ap, aroben, code, dglazkov, mitz
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=243594
Bug Depends on:    
Bug Blocks: 39021    
Attachments:
Description Flags
test case none

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.

<html>
	<body>
		<form method="post" action="nonpage.html">
			<input type="text">
			<input type="submit" value="This is disabled" DISABLED/>
		</form>
	</body>
</html>
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
Comment 11 Erik Ostrom 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.