mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
3da6924790
commit
a86829515b
1 changed files with 5 additions and 1 deletions
|
|
@ -1324,7 +1324,11 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
||||||
window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");
|
window.siyuan.menus.menu.element.setAttribute("data-from", popoverElement ? popoverElement.dataset.level + "popover" : "app");
|
||||||
if (!protyle.disabled) {
|
if (!protyle.disabled) {
|
||||||
const textElements = window.siyuan.menus.menu.element.querySelectorAll("textarea");
|
const textElements = window.siyuan.menus.menu.element.querySelectorAll("textarea");
|
||||||
|
if (textElements[0].value) {
|
||||||
textElements[1].select();
|
textElements[1].select();
|
||||||
|
} else {
|
||||||
|
textElements[0].select();
|
||||||
|
}
|
||||||
window.siyuan.menus.menu.removeCB = () => {
|
window.siyuan.menus.menu.removeCB = () => {
|
||||||
const ocrElement = window.siyuan.menus.menu.element.querySelector('[data-type="ocr"]') as HTMLTextAreaElement;
|
const ocrElement = window.siyuan.menus.menu.element.querySelector('[data-type="ocr"]') as HTMLTextAreaElement;
|
||||||
if (ocrElement && ocrElement.dataset.ocrText !== ocrElement.value) {
|
if (ocrElement && ocrElement.dataset.ocrText !== ocrElement.value) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue