If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

If a link is placed inside of a label tag with an input submission button, which it shouldn't be, <br>the link will submit the form if the href attribute of the link contains a javascript request.

RESOLVED DUPLICATE of bug 163912

Status

()

Firefox
General
--
minor
RESOLVED DUPLICATE of bug 163912
10 years ago
10 years ago

People

(Reporter: Joe Burnett, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0

If a link is placed inside of a label tag with an input submission button, which it shouldn't be, the link will submit the form if the href attribute of the link contains a javascript request. If the href attribute is not javascript, the form does not submit. Here is a sample:

<html>
<head><title>Firefox 3rc1 label bug</title>
</head><body>

<h1>Firefox 3rc1 label bug</h1>
<p>If a link is placed inside of a label tag with an input submission button, which it shouldn't be,
<br>the link will submit the form if the href attribute of the link contains a javascript request.</p>

<form action="destination.php">

	<label>
	<input type="submit" name="button" id="button" value="Submit">
	<a href="javascript:void(0);">Link that should do nothing</a>
	</label>

</form>

</body>
</html>


Reproducible: Always

Steps to Reproduce:
1. Create a form
2. Create a label with a submit button and a link (bad code)
3. Make the href attribute for the link a javascript request
4. Click the link
Actual Results:  
The form is submitted.

Expected Results:  
The javascript request should fire off instead of the form submission.

Updated

10 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 163912
You need to log in before you can comment on or make changes to this bug.