Fixed delay when opening panels
This commit is contained in:
parent
180e98219e
commit
c507029d0d
@ -27,7 +27,7 @@ define([
|
|||||||
], function($, _, crel, ace, constants, utils, storage, settings, eventMgr, shortcutMgr, mousetrap, bodyIndexHTML, bodyViewerHTML, settingsTemplateTooltipHTML, settingsUserCustomExtensionTooltipHTML) {
|
], function($, _, crel, ace, constants, utils, storage, settings, eventMgr, shortcutMgr, mousetrap, bodyIndexHTML, bodyViewerHTML, settingsTemplateTooltipHTML, settingsUserCustomExtensionTooltipHTML) {
|
||||||
|
|
||||||
var core = {};
|
var core = {};
|
||||||
|
|
||||||
// Used for periodic tasks
|
// Used for periodic tasks
|
||||||
var intervalId;
|
var intervalId;
|
||||||
|
|
||||||
@ -679,6 +679,10 @@ define([
|
|||||||
isMenuPanelShown = true;
|
isMenuPanelShown = true;
|
||||||
menuPanelBackdropElt = utils.createBackdrop('collapse', '.menu-panel');
|
menuPanelBackdropElt = utils.createBackdrop('collapse', '.menu-panel');
|
||||||
$menuPanelElt.addClass('move-to-front');
|
$menuPanelElt.addClass('move-to-front');
|
||||||
|
// To avoid opening delay
|
||||||
|
setTimeout(function() {
|
||||||
|
$menuPanelElt.trigger($.support.transition.end);
|
||||||
|
}, 50);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Close all open sub-menus when one submenu opens
|
// Close all open sub-menus when one submenu opens
|
||||||
@ -707,6 +711,10 @@ define([
|
|||||||
isDocumentPanelShown = true;
|
isDocumentPanelShown = true;
|
||||||
documentPanelBackdropElt = utils.createBackdrop('collapse', '.document-panel');
|
documentPanelBackdropElt = utils.createBackdrop('collapse', '.document-panel');
|
||||||
$documentPanelElt.addClass('move-to-front');
|
$documentPanelElt.addClass('move-to-front');
|
||||||
|
// To avoid opening delay
|
||||||
|
setTimeout(function() {
|
||||||
|
$documentPanelElt.trigger($.support.transition.end);
|
||||||
|
}, 50);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Close all open sub-menus when one submenu opens
|
// Close all open sub-menus when one submenu opens
|
||||||
|
Loading…
Reference in New Issue
Block a user