Skip to content

Commit f8fbaaf

Browse files
authored
Make a distinction between active and selected in the issue author dropdown (go-gitea#30207)
Signed-off-by: Yarden Shoham <[email protected]>
1 parent 44dd6d6 commit f8fbaaf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_src/js/features/repo-issue-list.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ function initRepoIssueListAuthorDropdown() {
149149
$searchDropdown.dropdown('refresh');
150150
// defer our selection to the next tick, because dropdown will set the selection item after this `menu` function
151151
setTimeout(() => {
152-
menu.querySelector('.item.active, .item.selected')?.classList.remove('active', 'selected');
152+
for (const el of menu.querySelectorAll('.item.active, .item.selected')) {
153+
el.classList.remove('active', 'selected');
154+
}
153155
menu.querySelector(`.item[data-value="${selectedUserId}"]`)?.classList.add('selected');
154156
}, 0);
155157
};

0 commit comments

Comments
 (0)