Closed Bug 622117 Opened 14 years ago Closed 14 years ago

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

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla2.0b9
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: danne.da, Assigned: bzbarsky)

References

Details

(Keywords: regression)

Attachments

(2 files)

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
Attached file Testcase
I see this too in today's nightly. Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
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
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
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]
Attachment #500415 - Flags: review?(Olli.Pettay) → review+
Whiteboard: [need review] → [need landing]
Pushed http://hg.mozilla.org/mozilla-central/rev/9dead0bfa0f3
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [need landing]
Target Milestone: --- → mozilla2.0b9
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+
No longer blocks: 331959
Blocks: 331959
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: