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 7ccb873d73..2031d844f8 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 @@ -275,11 +275,6 @@ targetPromise.then( function ( target ) { target.section = section; - // Enqueue the loading of deferred modules (that is, modules which provide - // functionality that is not needed for loading the editor). - setTimeout( function () { - mw.loader.load( 'easy-deflate.deflate' ); - }, 500 ); } ); return targetPromise; diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index 2981d2d930..d93c3634e7 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -540,6 +540,12 @@ ve.init.mw.ArticleTarget.prototype.surfaceReady = function () { surfaceModel.startStoringChanges(); // TODO: Listen to autosaveFailed event to notify user + // Start loading easy-deflate module in the background, so it's + // already loaded when the save dialog is opened. + setTimeout( function () { + mw.loader.load( 'easy-deflate.deflate' ); + }, 500 ); + // Parent method ve.init.mw.ArticleTarget.super.prototype.surfaceReady.apply( this, arguments ); };