aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2024-03-30 12:40:39 +0300
committerGitHub <noreply@github.com>2024-03-30 10:40:39 +0100
commit66f7d47d2c702bab4ca9bcedc1c0ba9ddfa49a17 (patch)
tree59f10c939a4520e2525c3f65409b6460cd0e252d /web_src/js
parentb6a3cd4b8dc20ba48d0044a972f6ff0f0de6e49e (diff)
downloadgitea-66f7d47d2c702bab4ca9bcedc1c0ba9ddfa49a17.tar.gz
gitea-66f7d47d2c702bab4ca9bcedc1c0ba9ddfa49a17.zip
Remove jQuery class from the comment context menu (#30179)
- Switched from jQuery class functions to plain JavaScript - Tested the comment context menu functionality and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/modules/fomantic/dropdown.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/modules/fomantic/dropdown.js b/web_src/js/modules/fomantic/dropdown.js
index e795e8e2c8..82e710860d 100644
--- a/web_src/js/modules/fomantic/dropdown.js
+++ b/web_src/js/modules/fomantic/dropdown.js
@@ -207,7 +207,7 @@ function attachDomEvents(dropdown, focusable, menu) {
if (!$item) $item = $(menu).find('> .item.selected'); // when dropdown filters items by input, there is no "value", so query the "selected" item
// if the selected item is clickable, then trigger the click event.
// we can not click any item without check, because Fomantic code might also handle the Enter event. that would result in double click.
- if ($item && ($item[0].matches('a') || $item.hasClass('js-aria-clickable'))) $item[0].click();
+ if ($item?.[0]?.matches('a, .js-aria-clickable')) $item[0].click();
}
});