First triggered event skips listener




DOM: Events
12 years ago
19 days ago


(Reporter: E. de Graaff, Unassigned)


Windows Server 2003

Firefox Tracking Flags

(Not tracked)





12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1) Gecko/20060918 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1) Gecko/20060918 Firefox/2.0

When adding a listener to an object from the DOM of the web page, you can fire events from JavaScript to that object. The eventlistener picks it up as expected.

However, when I add the listener from the code from an extension, the first fired event seems to be skipped. The listener will not be invoked. All other events after that work fine (even after reloading the page).

A sample is included which fires events to be picked up by:
- A listener from the JavaScript itself (works fine)
- A listener from the Extension script (skips first one)

Also, an extension which simply adds a listener to the object and just alerts, is included.

I've tried this with 2.0b, 2.0RC1 and 3.0 (nightly from 19-09-2006). It works fine with though. Also, when adding the listener from the webpage, and firing from the extension, the same thing occurs.

Reproducible: Always

Steps to Reproduce:
(basically what the example shows)
1.Add listener from the extensions JavaScript to a DOM object
2.Fire an event from the webpage JavaScript on that object
3.Listener won't be invoked, but will if you fire again.

Actual Results:  
1st (in a 'fresh' new browser) time no alert, after that no problems

Expected Results:  
Invoke the listener the first time too

Not really urgent, workaround is firing a dummy event but that's not the way it should be ofcourse.
Assignee: events → nobody
QA Contact: ian → events

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.