From 07671c6b53a298447d915739ee7a682b0d505372 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 2 Dec 2013 12:28:09 -0800 Subject: [PATCH 1/2] Followup eb95d7b0b2: don't hide the inspectors WindowSet at all There's no point in hiding the WindowSet if we've already closed the open window in it. In fact, there's no point in hiding a WindowSet pretty much ever. Change-Id: I49a02b5d255b266eb9e0a537cb64082eb0ad5e4b --- modules/ve/ui/ve.ui.Context.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js index 0ff9884bda..01b822648d 100644 --- a/modules/ve/ui/ve.ui.Context.js +++ b/modules/ve/ui/ve.ui.Context.js @@ -402,9 +402,6 @@ ve.ui.Context.prototype.show = function ( transition, repositionOnly ) { // 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 +412,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 && From 1df63b8a637fd4b18ee739e45ebd860b1d7174f8 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 2 Dec 2013 13:03:06 -0800 Subject: [PATCH 2/2] Use visibility: hidden; for the ui.Context and its popup They contain iframes and those need to not be display: none; in order to make Firefox happy. Bug: 57568 Change-Id: I177877bff3c3b18bfc87ee4e6afa7e60fea26ffc --- modules/ve/ui/ve.ui.Context.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js index 01b822648d..8230c6c7b4 100644 --- a/modules/ve/ui/ve.ui.Context.js +++ b/modules/ve/ui/ve.ui.Context.js @@ -396,7 +396,11 @@ 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 @@ -444,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; }