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>
pull/30183/head^2
Yarden Shoham 8 months ago committed by GitHub
parent b6a3cd4b8d
commit 66f7d47d2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      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();
}
});

Loading…
Cancel
Save