Merge pull request '[PORT] Remove jQuery class from the comment context menu (gitea#30179)' (#5019) from gusted/forgejo-bp-gt-30179 into v7.0/forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5019
Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
Gusted 2024-08-20 13:46:11 +00:00
commit a84730775a

View file

@ -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();
}
});