From 1aae17c7a515567f4c0ce458f9e587d65d088d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 2 Nov 2018 17:54:01 +0100 Subject: [PATCH] DesktopArticleTarget.init: Don't load on special pages with action=submit in the URL Bug: T168533 Bug: T176022 Change-Id: Ifb7b9cca21423684a901dccabab23fb64e576102 --- .../targets/ve.init.mw.DesktopArticleTarget.init.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js index 96c1c09148..685993a2da 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js @@ -507,15 +507,8 @@ pageExists = !!mw.config.get( 'wgRelevantArticleId' ); viewUri = new mw.Uri( mw.util.getUrl( mw.config.get( 'wgRelevantPageName' ) ) ); isViewPage = mw.config.get( 'wgIsArticle' ) && !( 'diff' in uri.query ); - pageCanLoadEditor = ( - isViewPage || - mw.config.get( 'wgAction' ) === 'edit' || - mw.config.get( 'wgAction' ) === 'submit' - ); - isEditPage = ( - uri.query.action === 'edit' || - uri.query.action === 'submit' - ); + isEditPage = mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit'; + pageCanLoadEditor = isViewPage || isEditPage; // Cast "0" (T89513) enable = !!+mw.user.options.get( 'visualeditor-enable' );