Apply suggestions from code review

Co-authored-by: Peter <specc.dev@gmail.com>
Co-authored-by: KoshaevEugeny <103786108+akulistus@users.noreply.github.com>
This commit is contained in:
KoshaevEugeny 2026-03-11 18:35:46 +03:00 committed by GitHub
commit 714ee3e6ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -572,7 +572,7 @@ export default class Dom {
* @param element - element to check
* @returns {HTMLAnchorElement | null}
*/
public static getAnchor(element: Element): HTMLAnchorElement | null {
public static getClosestAnchor(element: Element): HTMLAnchorElement | null {
return element.closest("a");
}

View file

@ -773,7 +773,7 @@ export default class UI extends Module<UINodes> {
*/
const element = event.target as Element;
const ctrlKey = event.metaKey || event.ctrlKey;
const anchor = $.getAnchor(element);
const anchor = $.getClosestAnchor(element);
if (anchor && ctrlKey) {
event.stopImmediatePropagation();