From cf19d7f3ad58aa2829bedc42ebc69542c975ffde Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 3 Jan 2022 21:19:48 +0000 Subject: [PATCH] Fix findPreviousVisibleTab action Fixes #3320 --- .../@node-red/editor-client/src/js/ui/common/tabs.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js index d1e6a39d2..82adb2ed3 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js @@ -578,7 +578,7 @@ RED.tabs = (function() { function findPreviousVisibleTab(li) { if (!li) { - li = ul.find("li.active").parent(); + li = ul.find("li.active"); } var previous = li.prev(); while(previous.length > 0 && previous.hasClass("hide-tab")) { @@ -588,9 +588,9 @@ RED.tabs = (function() { } function findNextVisibleTab(li) { if (!li) { - li = ul.find("li.active").parent(); + li = ul.find("li.active"); } - var next = ul.find("li.active").next(); + var next = li.next(); while(next.length > 0 && next.hasClass("hide-tab")) { next = next.next(); }