mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 04:06:51 +00:00
Expand recursive call protection in ve.ui.Window#close
Focussing the view leads to another call of 'close' which must be protected against. Bug: 50140 Change-Id: I8c68468a95cddbc7efb222cf3a1f9868b2949285
This commit is contained in:
parent
ac8d5eccb2
commit
4e728ebf26
|
@ -326,10 +326,12 @@ ve.ui.Window.prototype.close = function ( action ) {
|
|||
this.$.hide();
|
||||
this.visible = false;
|
||||
this.onClose( action );
|
||||
this.closing = false;
|
||||
this.frame.$content.find( ':focus' ).blur();
|
||||
this.surface.getView().focus();
|
||||
this.emit( 'close', action );
|
||||
// Note that focussing the surface view calls an on focus event, which in turn will
|
||||
// try to close the window again, hence we put this.closing = false right at the bottom
|
||||
this.closing = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue