button element uses incorrect default for type attribute, causing form submission

VERIFIED DUPLICATE of bug 220047

Status

()

VERIFIED DUPLICATE of bug 220047
14 years ago
14 years ago

People

(Reporter: jeremy, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050105
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050105

If a button element doesn't have a type attribute specified, such as in the
following example:

<button>click me</button> 

Then the default value of the type attribute should be 'button'. It appears
however that the default value becomes submit, which causes the entire form to
be submitted, which obviously isn't the expected behavior.

See my test page for a demonstration: http://jeremy.hartzz.com/bug_button.html

Reproducible: Always

Steps to Reproduce:
See example page, or make a form with:

<form name="f1" action="http://www.disney.com" method="get">
	<button>Button (No Type)</button>
	<button type="button">Button type="button"</button>
	<button type="submit">Button type="submit"</button>
</form>

Comment 1

14 years ago

*** This bug has been marked as a duplicate of 220047 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
indeed - this is the correct behaviour. vrfy.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.