From 1a8984e143189551de6180206c9a5fd81a733d9e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 20 Oct 2024 21:48:33 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12851 --- app/src/menus/protyle.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 00487bc5b..df57fa8d7 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -1324,7 +1324,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app"); if (!protyle.disabled) { const textElements = window.siyuan.menus.menu.element.querySelectorAll("textarea"); - textElements[0].focus(); + textElements[1].select(); window.siyuan.menus.menu.removeCB = () => { const ocrElement = window.siyuan.menus.menu.element.querySelector('[data-type="ocr"]') as HTMLTextAreaElement; if (ocrElement && ocrElement.dataset.ocrText !== ocrElement.value) { @@ -1585,7 +1585,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText if (protyle.disabled) { return; } - if (focusText || protyle.lute.GetLinkDest(linkAddress)) { + if (focusText || protyle.lute.GetLinkDest(linkAddress) || linkAddress?.startsWith("assets/")) { inputElements[1].select(); } else { inputElements[0].select();