FF5+: [link].click no longer returns undefined, though [link].click() still unsupported.

VERIFIED FIXED

Status

()

Core
DOM: Core & HTML
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: pete.j.scott, Unassigned)

Tracking

5 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 545074 [details]
index.html

User Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0
Build ID: 20110705195857

Steps to reproduce:

Tested code to avoid firing click() on an anchor element by checking for (anchor.click), 
i.e.:
if (anchor.click) { anchor.click(); }

[ATTACHED AS index.html].


Actual results:

anchor.click returns a function in Firefox 5.0 and Firefox 6.0. Previously (FF3.6, FF4.0) it returned 'undefined'. This causes existing code that allows anchor.click() calls when anchor.click != 'undefined' to fire, which does not work (and does not throw error, simply fails to execute).


Expected results:

I would expect anchor.click to continue returning 'undefined', since anchor.click() is still not supported by Firefox.

Comment 1

6 years ago
This should be fixed with bug 666604 in Firefox 7.

Please download and test with Firefox 7 Aurora build, thanks!
http://www.mozilla.com/firefox/channel/

Updated

6 years ago
Attachment #545074 - Attachment mime type: text/plain → text/html
(Reporter)

Comment 2

6 years ago
Confirmed fixed with Firefox 7 Aurora build 7.0a2. Thanks!

Comment 3

6 years ago
-> FIXED with bug 666604
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Component: General → DOM: Core & HTML
Depends on: 666604
OS: Other → All
Product: Firefox → Core
QA Contact: general → general
Resolution: --- → FIXED
Note that anchor.click() does in fact execute and does what it's supposed to: fires an untrusted click event on the anchor.  If you have an onclick listener, it will get triggered....
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.