From 15d8226d56b97566badf0ac4a9eb129ede5de072 Mon Sep 17 00:00:00 2001 From: howlger Date: Mon, 9 Oct 2023 11:27:58 +0200 Subject: [PATCH] Modernized help UI prototype: Fix set scope still set after deletion Fix the issue that a set scope will still be shown as active after it has been deleted. --- ua/org.eclipse.help.webapp/m/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ua/org.eclipse.help.webapp/m/index.js b/ua/org.eclipse.help.webapp/m/index.js index 5052c1b7f49..9acfb77a1c8 100644 --- a/ua/org.eclipse.help.webapp/m/index.js +++ b/ua/org.eclipse.help.webapp/m/index.js @@ -350,6 +350,12 @@ }); } else { var deleteButton = createButton(scopesPage, '<%js:scopes_scope_delete_button_label%>', '<%js:scopes_scope_delete_button_description%>', function() { + + // if the scope to be deleted is set, unset it first + if (searchScope.l == 4 && searchScope.t == scopeNr) { + setSearchScope([0, '', 0]); + } + doScopesOperation('remove&workingSet=' + encodeURIComponent(scopeName)); }); deleteButton.className = 'b br';