From ae90e03c602725259f262570746495c1eaa8107f Mon Sep 17 00:00:00 2001 From: Eugeny Date: Wed, 4 Mar 2026 01:39:00 +0300 Subject: [PATCH] fix(link-tool): handle formatted linked text clicks --- src/components/modules/ui.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modules/ui.ts b/src/components/modules/ui.ts index a4d3baad..a28da024 100644 --- a/src/components/modules/ui.ts +++ b/src/components/modules/ui.ts @@ -771,7 +771,7 @@ export default class UI extends Module { * case when user clicks on anchor element * if it is clicked via ctrl key, then we open new window with url */ - const element = event.target as Element; + const element = (event.target as Element).closest("a"); const ctrlKey = event.metaKey || event.ctrlKey; if ($.isAnchor(element) && ctrlKey) {