diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index faae12fa8..671e6478e 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -2388,7 +2388,7 @@ export class WYSIWYG { } const tagElement = hasClosestByAttribute(event.target, "data-type", "tag"); - if (tagElement && !event.altKey && !event.shiftKey) { + if (tagElement && !event.altKey && !event.shiftKey && range.toString() === "") { /// #if !MOBILE openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed, {method: 0}); hideElements(["dialog"]);