From fa6e0c8964f29255bfbd4e93a34825102f35306b Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 28 Jan 2021 23:42:32 +0000 Subject: [PATCH] Ensure the first sidebar tab is shown when editor loads --- packages/node_modules/@node-red/editor-client/src/js/red.js | 3 +++ .../node_modules/@node-red/editor-client/src/js/ui/sidebar.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js index 0b33855fe..888447599 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/red.js +++ b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -516,6 +516,9 @@ var RED = (function() { $(".red-ui-header-toolbar").show(); + + RED.sidebar.show(":first"); + setTimeout(function() { loader.end(); },100); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js b/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js index 8d9c15cd6..bc1bbf287 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/sidebar.js @@ -195,6 +195,9 @@ RED.sidebar = (function() { } function showSidebar(id) { + if (id === ":first") { + id = RED.settings.get("editor.sidebar.order",["info", "help", "version-control", "debug"])[0] + } if (id) { if (!containsTab(id)) { sidebar_tabs.addTab(knownTabs[id]);