aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2024-03-31 14:27:39 +0300
committerGitHub <noreply@github.com>2024-03-31 11:27:39 +0000
commitf8fbaaf26fa7798fde690f4400910069fbccd40e (patch)
tree3fc88c34128ab29b8d84d9ec4f8ef02104e90b9f
parent44dd6d6927180a4d36b3811fd2fb7557d0b44adb (diff)
downloadgitea-f8fbaaf26fa7798fde690f4400910069fbccd40e.tar.gz
gitea-f8fbaaf26fa7798fde690f4400910069fbccd40e.zip
Make a distinction between `active` and `selected` in the issue author dropdown (#30207)
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
-rw-r--r--web_src/js/features/repo-issue-list.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/web_src/js/features/repo-issue-list.js b/web_src/js/features/repo-issue-list.js
index ccd13bbcf5..92f058c4d2 100644
--- a/web_src/js/features/repo-issue-list.js
+++ b/web_src/js/features/repo-issue-list.js
@@ -149,7 +149,9 @@ function initRepoIssueListAuthorDropdown() {
$searchDropdown.dropdown('refresh');
// defer our selection to the next tick, because dropdown will set the selection item after this `menu` function
setTimeout(() => {
- menu.querySelector('.item.active, .item.selected')?.classList.remove('active', 'selected');
+ for (const el of menu.querySelectorAll('.item.active, .item.selected')) {
+ el.classList.remove('active', 'selected');
+ }
menu.querySelector(`.item[data-value="${selectedUserId}"]`)?.classList.add('selected');
}, 0);
};