diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js index 33a186585..2e7cd8f03 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tray.js @@ -166,6 +166,8 @@ RED.tray = (function() { setTimeout(function() { // Delay resetting the flag, so we don't close prematurely openingTray = false; + raiseTrayZ(); + handleWindowResize();//cause call to monaco layout },200); body.find(":focusable:first").trigger("focus"); @@ -206,6 +208,17 @@ RED.tray = (function() { } } + //raise tray z-index to prevent editor context menu being clipped by sidebar + function raiseTrayZ() { + setTimeout(function(){ + $('#red-ui-editor-stack').css("zIndex","13"); + },300); + } + //lower tray z-index back to original place for correct slide animation (related to fix for editor context menu clipped by sidebar) + function lowerTrayZ(){ + $('#red-ui-editor-stack').css("zIndex","9"); + } + return { init: function init() { editorStack = $("#red-ui-editor-stack"); @@ -221,6 +234,7 @@ RED.tray = (function() { }); }, show: function show(options) { + lowerTrayZ(); if (!options) { if (stack.length > 0) { var tray = stack[stack.length-1]; @@ -252,6 +266,7 @@ RED.tray = (function() { }, hide: function hide() { + lowerTrayZ(); if (stack.length > 0) { var tray = stack[stack.length-1]; tray.tray.css({ @@ -266,6 +281,7 @@ RED.tray = (function() { }, resize: handleWindowResize, close: function close(done) { + lowerTrayZ(); //lower tray z-index for correct animation if (stack.length > 0) { var tray = stack.pop(); tray.tray.css({ @@ -284,6 +300,8 @@ RED.tray = (function() { handleWindowResize(); oldTray.tray.css({right:0}); if (oldTray.options.show) { + raiseTrayZ(); + handleWindowResize();//cause call to monaco layout oldTray.options.show(); } },0); diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss index d85527178..391ae8585 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss @@ -46,7 +46,7 @@ right: 315px; bottom:10px; width: 7px; - z-index: 11; + // z-index: 11; background: $primary-background url(images/grip.png) no-repeat 50% 50%; cursor: col-resize; } @@ -134,6 +134,7 @@ button.red-ui-sidebar-header-button-toggle { right: calc(100%); border-top-left-radius: 5px; border-bottom-left-radius: 5px; + z-index: 13; } .red-ui-sidebar-control-left { @include red-ui-sidebar-control;