mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge changes I177877bf,I49a02b5d
* changes:
Use visibility: hidden; for the ui.Context and its popup
Followup eb95d7b0b2
: don't hide the inspectors WindowSet at all
This commit is contained in:
commit
5ca96e805f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue