Open Bug 1204782 Opened 9 years ago Updated 2 years ago

unload event is not bubbles up to XUL

Categories

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

40 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: 4b.69.6d.6f, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 YaBrowser/15.7.2357.2877 Safari/537.36 Steps to reproduce: 1. Open a tab with any website (example.com) 2. In JS console do: gBrowser.addEventListener('unload', console.log.bind(console, "UNLOAD 1"), true); // var xulBrowser = gBrowser.browsers[1]; xulBrowser.addEventListener('unload', console.log.bind(console, "UNLOAD 2"), true); 3. Change url in the address bar of the tab to another website (example.org) 4. Check JS console 5. In tab console do window.addEventListener('unload', console.log.bind(console, "UNLOAD 3"), false); 6. Change url in the address bar of the tab to another website (example.com) 7. Check JS console Actual results: On step 4 I see no messages. On step 7 I see 3 messages (unload 1, unload 2, unload 3) Expected results: On step 4 I should see 2 messages (unload 1, unload 2). Also, if on step 3 I do redirection via JS or just location.reload() or press F5 or press reload button near address bar, then on step 4 I see 2 messages (unload 1, unload 2)
Component: General → Event Handling
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.