mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 16:44:51 +00:00
ve.init.mw.DesktopArticleTarget: Remove some unnecessary toolbar setup code
This code, added in703b2c2ed0
(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 (d371014e5d
) 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
This commit is contained in:
parent
f1b7225336
commit
92bb0e557a
|
@ -458,12 +458,6 @@ ve.init.mw.DesktopArticleTarget.prototype.activate = function ( dataPromise ) {
|
||||||
surface.setReadOnly( true );
|
surface.setReadOnly( true );
|
||||||
// setSurface creates dummy toolbar
|
// setSurface creates dummy toolbar
|
||||||
this.setSurface( surface );
|
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 );
|
this.load( dataPromise );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue