Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/70623
Change subject: Expand recursive call protection in ve.ui.Window#close ...................................................................... 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 --- M modules/ve/ui/ve.ui.Window.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/23/70623/1 diff --git a/modules/ve/ui/ve.ui.Window.js b/modules/ve/ui/ve.ui.Window.js index 74486f7..a108918 100644 --- a/modules/ve/ui/ve.ui.Window.js +++ b/modules/ve/ui/ve.ui.Window.js @@ -326,10 +326,12 @@ 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; } }; -- To view, visit https://gerrit.wikimedia.org/r/70623 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c68468a95cddbc7efb222cf3a1f9868b2949285 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits