Closed Bug 670528 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

5 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: pete.j.scott, Unassigned)

References

Details

Attachments

(1 file)

Attached file 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.
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/
Attachment #545074 - Attachment mime type: text/plain → text/html
Confirmed fixed with Firefox 7 Aurora build 7.0a2. Thanks!
-> FIXED with bug 666604
Status: UNCONFIRMED → RESOLVED
Closed: 13 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.

Attachment

General

Creator:
Created:
Updated:
Size: