From 92bb0e557ac818853e665a01037acd69a979e82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 7 Feb 2019 21:04:32 +0100 Subject: [PATCH] ve.init.mw.DesktopArticleTarget: Remove some unnecessary toolbar setup code This code, added in 703b2c2ed08e13afd856fbb72b44673863cc135f (2015), is no longer necessary. // Disconnect the tool factory listeners so the toolbar // doesn't start showing new tools as they load, too // much flickering this.getToolbar().getToolFactory().off( 'register' ); Introduction of targetLoader (d371014e5dfe54d21986cff041bfb92e8e390a45) resulted in all tools already being loaded before a Target is constructed, so this is definitely not needed. // Disable all the tools this.getToolbar().updateToolState(); The tools are already disabled because we set the surface to read-only above, so this does nothing. Change-Id: Idb162b60891cd1b961e29d2b9f62b74908f17957 --- .../ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 943e2ba971..a16ee6d1ba 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -458,12 +458,6 @@ ve.init.mw.DesktopArticleTarget.prototype.activate = function ( dataPromise ) { surface.setReadOnly( true ); // setSurface creates dummy toolbar this.setSurface( surface ); - // Disconnect the tool factory listeners so the toolbar - // doesn't start showing new tools as they load, too - // much flickering - this.getToolbar().getToolFactory().off( 'register' ); - // Disable all the tools - this.getToolbar().updateToolState(); this.load( dataPromise ); }