diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js index 0ff9884bda..8230c6c7b4 100644 --- a/modules/ve/ui/ve.ui.Context.js +++ b/modules/ve/ui/ve.ui.Context.js @@ -396,15 +396,16 @@ ve.ui.Context.prototype.show = function ( transition, repositionOnly ) { if ( !this.showing && !this.hiding ) { this.showing = true; - this.$element.show(); + // HACK: make the context and popup visibility: hidden; instead of display: none; because + // they contain inspector iframes, and applying display: none; to those causes them to + // not load in Firefox + this.$element.css( 'visibility', '' ); + this.popup.$element.css( 'visibility', '' ); this.popup.show(); // Show either inspector or menu if ( inspector ) { this.$menu.hide(); - // Use visibility instead of .show()/.hide() so Firefox won't refuse to load the iframe - // inside the inspector (bug 57568) - this.inspectors.$element.css( 'visibility', '' ); if ( !repositionOnly ) { inspector.$element.css( 'opacity', 0 ); } @@ -415,9 +416,6 @@ ve.ui.Context.prototype.show = function ( transition, repositionOnly ) { inspector.$element.css( 'opacity', 1 ); }, this ), 200 ); } else { - // Use visibility instead of .show()/.hide() so Firefox won't refuse to load the iframe - // inside the inspector (bug 57568) - this.inspectors.$element.css( 'visibility', 'hidden' ); this.embedded = ( focusedNode && focusedNode.$focusable.outerHeight() > this.$menu.outerHeight() * 2 && @@ -450,8 +448,12 @@ ve.ui.Context.prototype.hide = function () { if ( inspector ) { inspector.close( { 'action': 'hide' } ); } + // HACK: make the context and popup visibility: hidden; instead of display: none; because + // they contain inspector iframes, and applying display: none; to those causes them to + // not load in Firefox this.popup.hide(); - this.$element.hide(); + this.popup.$element.show().css( 'visibility', 'hidden' ); + this.$element.css( 'visibility', 'hidden' ); this.visible = false; this.hiding = false; }