From c507029d0dec843a34e8158e7dd4353a80699915 Mon Sep 17 00:00:00 2001 From: benweet Date: Mon, 2 Dec 2013 22:11:17 +0000 Subject: [PATCH] Fixed delay when opening panels --- public/res/core.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/res/core.js b/public/res/core.js index d6dae54c..fdca5373 100644 --- a/public/res/core.js +++ b/public/res/core.js @@ -27,7 +27,7 @@ define([ ], function($, _, crel, ace, constants, utils, storage, settings, eventMgr, shortcutMgr, mousetrap, bodyIndexHTML, bodyViewerHTML, settingsTemplateTooltipHTML, settingsUserCustomExtensionTooltipHTML) { var core = {}; - + // Used for periodic tasks var intervalId; @@ -679,6 +679,10 @@ define([ isMenuPanelShown = true; menuPanelBackdropElt = utils.createBackdrop('collapse', '.menu-panel'); $menuPanelElt.addClass('move-to-front'); + // To avoid opening delay + setTimeout(function() { + $menuPanelElt.trigger($.support.transition.end); + }, 50); } else { // Close all open sub-menus when one submenu opens @@ -707,6 +711,10 @@ define([ isDocumentPanelShown = true; documentPanelBackdropElt = utils.createBackdrop('collapse', '.document-panel'); $documentPanelElt.addClass('move-to-front'); + // To avoid opening delay + setTimeout(function() { + $documentPanelElt.trigger($.support.transition.end); + }, 50); } else { // Close all open sub-menus when one submenu opens