From 714ee3e6ef618dfd1330d0560cd306e6aa21f956 Mon Sep 17 00:00:00 2001 From: KoshaevEugeny <103786108+akulistus@users.noreply.github.com> Date: Wed, 11 Mar 2026 18:35:46 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Peter Co-authored-by: KoshaevEugeny <103786108+akulistus@users.noreply.github.com> --- src/components/dom.ts | 2 +- src/components/modules/ui.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dom.ts b/src/components/dom.ts index 573c2d98..2f67e49a 100644 --- a/src/components/dom.ts +++ b/src/components/dom.ts @@ -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"); } diff --git a/src/components/modules/ui.ts b/src/components/modules/ui.ts index 708592df..d8dc3798 100644 --- a/src/components/modules/ui.ts +++ b/src/components/modules/ui.ts @@ -773,7 +773,7 @@ export default class UI extends Module { */ 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();