diff --git a/core/modules/startup/startup.js b/core/modules/startup/startup.js index b971e473b..4013a37ee 100755 --- a/core/modules/startup/startup.js +++ b/core/modules/startup/startup.js @@ -67,14 +67,6 @@ exports.startup = function() { wiki: $tw.wiki, document: $tw.browser ? document : $tw.fakeDocument }); - // Execute any startup actions - $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction"); - if($tw.browser) { - $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser"); - } - if($tw.node) { - $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node"); - } // Kick off the language manager and switcher $tw.language = new $tw.Language(); $tw.languageSwitcher = new $tw.PluginSwitcher({ @@ -117,6 +109,14 @@ exports.startup = function() { handlerMethod: "handleKeydownEvent" }]); } + // Execute any startup actions + $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction"); + if($tw.browser) { + $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser"); + } + if($tw.node) { + $tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node"); + } // Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup $tw.wiki.clearTiddlerEventQueue(); // Find a working syncadaptor