Open Bug 730259 Opened 13 years ago Updated 3 years ago

javascript focus event, when listener is attached to a link (html:a), fires twice when user clicks on that link

Categories

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

10 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: d.koroliov, Unassigned)

Details

Attachments

(1 file)

Attached file ff_focus_bug_example
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Build ID: 20120215223356 Steps to reproduce: I tried to prevent link from gaining a focus and instead pass the focus to another html:input. For that reason I've attached a handler to the DOM object via .getElementById('#foo').onfocus = function (){ .getElementById('#foo_another').focus() return false }. Actual results: when link gains focus via "tab"-key all is fine, but if user clicks that link then event fires twice and handler executes twice respectivelly Expected results: if user clicks the link event should fire only one time
Component: Untriaged → Event Handling
Product: Firefox → Core
QA Contact: untriaged → events
Attachment #600361 - Attachment mime type: text/plain → text/html
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: