1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-27 09:11:53 -05:00

[PORT] Remove jQuery class from the comment context menu (gitea #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>

---

Resolves #5016

(cherry picked from commit 66f7d47d2c702bab4ca9bcedc1c0ba9ddfa49a17)
This commit is contained in:
Yarden Shoham 2024-03-30 12:40:39 +03:00 committed by Gusted
parent 684c3106b4
commit d6a21fcb79
No known key found for this signature in database
GPG key ID: FD821B732837125F

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