diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index a069cf906..e5b969828 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -1045,7 +1045,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme }); textElements[2].value = imgElement.getAttribute("alt") || ""; element.addEventListener("click", (event) => { - let target = event.target as HTMLElement + let target = event.target as HTMLElement; while (target) { if (target.dataset.action === "copy") { writeText((target.parentElement.nextElementSibling as HTMLTextAreaElement).value); @@ -1054,7 +1054,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme } target = target.parentElement; } - }) + }); } }).element); window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element); @@ -1449,7 +1449,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText }); element.addEventListener("click", (event) => { - let target = event.target as HTMLElement + let target = event.target as HTMLElement; while (target) { if (target.dataset.action === "copy") { writeText((target.parentElement.nextElementSibling as HTMLTextAreaElement).value); @@ -1458,7 +1458,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText } target = target.parentElement; } - }) + }); } }).element); window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element); diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 02128e873..21d7d31b6 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -434,7 +434,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => { }); } else { // 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724 - const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID + const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID; Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${avID}"]`)).forEach((item: HTMLElement) => { item.removeAttribute("data-render"); const updateRow = item.querySelector('.av__row[data-need-update="true"]'); diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts index bd960a513..0824e8a17 100644 --- a/app/src/protyle/wysiwyg/enter.ts +++ b/app/src/protyle/wysiwyg/enter.ts @@ -249,7 +249,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle const undoOperation: IOperation[] = []; let currentElement = blockElement; // 回车之前的块为 1\n\n2 时会产生多个块 - const selectsElement: Element[] = [] + const selectsElement: Element[] = []; Array.from(enterElement.children).forEach((item: HTMLElement) => { if (item.dataset.nodeId === id) { blockElement.before(item); @@ -303,7 +303,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle currentElement = item; selectsElement.push(item); }); - const parentElement = currentElement.parentElement + const parentElement = currentElement.parentElement; transaction(protyle, doOperation, undoOperation); if (parentElement.classList.contains("sb") && parentElement.getAttribute("data-sb-layout") === "col") { turnsIntoOneTransaction({