toggleSidebar() DNW during load event when using openWebPanel

NEW
Unassigned

Status

()

Firefox
Toolbars and Customization
5 years ago
5 years ago

People

(Reporter: erikvold, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Try this is Scratchpad:


let sidebar = window.document.getElementById('sidebar');
sidebar.addEventListener('load', function() {
  window.toggleSidebar();
}, false)
window.openWebPanel('test', 'https://mozilla.org');
sidebar.hidden
/*
false
*/

Expected: the sidebar would be closed

Actual: the sidebar is left open
Ah so this works:

let sidebar = window.document.getElementById('sidebar');
sidebar.addEventListener('load', function() {
  window.toggleSidebar();
}, true)
window.openWebPanel('test', 'https://mozilla.org');
sidebar.hidden
You need to log in before you can comment on or make changes to this bug.