Bug 974804 - UITour: Calling recreatePopup on the menu panel before it's ready leads to a computed width of 0 for the panel scroller. r=adw

This commit is contained in:
Matthew Noorenberghe 2014-02-21 14:42:40 -08:00
parent 8c599ee8ea
commit 29626e8b0a

View File

@ -927,6 +927,12 @@ this.UITour = {
recreatePopup: function(aPanel) {
// After changing popup attributes that relate to how the native widget is created
// (e.g. @noautohide) we need to re-create the frame/widget for it to take effect.
if (aPanel.hidden) {
// If the panel is already hidden, we don't need to recreate it but flush
// in case someone just hid it.
aPanel.clientWidth; // flush
return;
}
aPanel.hidden = true;
aPanel.clientWidth; // flush
aPanel.hidden = false;