jenkins-bot has submitted this change and it was merged. Change subject: Remove surface blur hack now that windows take focus properly ......................................................................
Remove surface blur hack now that windows take focus properly Depends on I5786458 in OOUI. Change-Id: I403a1bb9b7271bf2e3e9f4535c1ecec84138e084 --- M modules/ve/ui/actions/ve.ui.WindowAction.js 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Jforrester: Looks good to me, approved Trevor Parscal: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ui/actions/ve.ui.WindowAction.js b/modules/ve/ui/actions/ve.ui.WindowAction.js index 4a50921..c806fd2 100644 --- a/modules/ve/ui/actions/ve.ui.WindowAction.js +++ b/modules/ve/ui/actions/ve.ui.WindowAction.js @@ -44,20 +44,21 @@ * @param {Object} [data] Window opening data */ ve.ui.WindowAction.prototype.open = function ( name, data ) { - var windowClass = ve.ui.windowFactory.lookup( name ), + var win, + windowClass = ve.ui.windowFactory.lookup( name ), fragment = this.surface.getModel().getFragment( null, true ), dir = fragment.getRange() ? this.surface.getView().getDocument().getDirectionFromRange( fragment.getRange() ) : this.surface.getModel().getDocument().getDir(); data = ve.extendObject( { 'dir': dir }, data ); + if ( windowClass.prototype instanceof ve.ui.Dialog ) { - // HACK: This shouldn't be needed, but thar be dragons yonder in the window class - this.surface.getView().getDocument().getDocumentNode().$element[0].blur(); - this.surface.getDialogs().getWindow( name ).open( fragment, data ); + win = this.surface.getDialogs().getWindow( name ); } else if ( windowClass.prototype instanceof ve.ui.Inspector ) { - this.surface.getContext().getInspector( name ).open( fragment, data ); + win = this.surface.getContext().getInspector( name ); } + win.open( fragment, data ); }; /* Registration */ -- To view, visit https://gerrit.wikimedia.org/r/130269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I403a1bb9b7271bf2e3e9f4535c1ecec84138e084 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: Trevor Parscal <tpars...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits