Links with href broken if JavaScript is disabled and onclick attribute is present

RESOLVED FIXED in mozilla2.0b9

Status

()

Core
Event Handling
P1
normal
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: d.a., Assigned: bz)

Tracking

({regression})

Trunk
mozilla2.0b9
regression
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b9pre) Gecko/20101230 Firefox/4.0b9pre
Build Identifier: 

If JavaScript is disabled or blocked (via NoScript) and the onclick attribute is present the links will not work. Instead it will stay on the page where the link is, see test-case.

Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f5eb60e1bc6e&tochange=e928817fb4e9

Happens with JavaScript disabled through options and trace and method pref'd off.

Reproducible: Always
(Reporter)

Comment 1

7 years ago
Created attachment 500347 [details]
Testcase
I see this too in today's nightly. Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 3

7 years ago
Regression window:
Works
http://hg.mozilla.org/mozilla-central/rev/699023bb3c9c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9pre) Gecko/20101222 Firefox/4.0b9pre ID:20101227122945
Fails:
http://hg.mozilla.org/mozilla-central/rev/b7acaa08a9c5
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9pre) Gecko/20101223 Firefox/4.0b9pre ID:20101227124535
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=699023bb3c9c&tochange=b7acaa08a9c5
Blocks: 331959
blocking2.0: --- → ?
Keywords: regression
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk

Comment 4

7 years ago
To be clear, this bug is for when the onclick attribute exists on an otherwise normal link with an href. The example case is:

<a href="http://www.google.com/" onclick="">Google</a>

(you'd want to mention that upfront, as otherwise disabling JavaScript would obviously be expected to break a link using only onclick)
Summary: Links broken if JavaScript is disabled and onclick attribute is present → Links with href broken if JavaScript is disabled and onclick attribute is present
Created attachment 500415 [details] [diff] [review]
Fix flag collision.

This is caused by a silent merge failure on hg's part when merging the patch in bug 331959 on top of the patch for bug 618196.  The result was the same value being used for both flags, so the exception from the onclick handler was treated as preventing anchor actions.
Attachment #500415 - Flags: review?(Olli.Pettay)
Assignee: nobody → bzbarsky
blocking2.0: ? → beta9+
Priority: -- → P1
Whiteboard: [need review]
Whiteboard: [need review] → [need landing]
Pushed http://hg.mozilla.org/mozilla-central/rev/9dead0bfa0f3
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [need landing]
Target Milestone: --- → mozilla2.0b9

Comment 7

7 years ago
As per today's meeting, beta 9 will be a time-based release. Marking these all betaN+. Please move it back to beta9+ if  you believe it MUST be in the next beta (ie: trunk is in an unshippable state without this)
blocking2.0: beta9+ → betaN+

Updated

7 years ago
No longer blocks: 331959
You need to log in before you can comment on or make changes to this bug.