return false; in onClick javascript doesn't inhibit default action

RESOLVED EXPIRED

Status

()

Core
DOM: Events
RESOLVED EXPIRED
15 years ago
13 years ago

People

(Reporter: mozilla, Assigned: saari (gone))

Tracking

Trunk
Sun
SunOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4a) Gecko/20030403
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4a) Gecko/20030403

When clicking on any of the external links (eg, links inside an article) with
onClick javascript, the return false; should inhibit the default action.  Works
under win2k and others, but is broken for Solaris 2.7.

Reproducible: Always

Steps to Reproduce:
1. Load the described URL
2. Click on either of the 2 links inside the article


Actual Results:  
External link opens both in new window and the current window

Expected Results:  
External link should have opened in new window; default action should have been
inhibited by the return false; in the onClick, so the original page should have
stayed put.

This has worked fine for some time under Windows and FreeBSD but seems to have
been consistently broken for a long time under Solaris (at least since 1.2).

Comment 1

15 years ago
Works for me in build 2003050108 on Mac OS X 10.2.5

This is actually a dupe of bug 121052, but that was closed for a lack of a
test-case.
Are there errors in the JS console?

Comment 3

14 years ago
There is test case in bug #237969, and I've described in bug #243431 that the
bug shows up more frequently than the original reporter for both this bug and
for #237969 thought.

Comment 4

14 years ago
Created attachment 155261 [details]
Test case displaying bug

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614
Firefox/0.9

Test Case Attached. Included event attachment (with code to alert the return
value) and inline onclick event. Neither seems to be working.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.