diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 75c93d5d0..8d1c695c7 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -2299,15 +2299,16 @@ export class Gutter { const rowElement = hasClosestByClassName(target, "av__row"); if (rowElement && !rowElement.classList.contains("av__row--header")) { element = rowElement; + const bodyElement = hasClosestByClassName(rowElement, "av__body") as HTMLElement; let iconAriaLabel = isMac() ? window.siyuan.languages.rowTip : window.siyuan.languages.rowTip.replace("⇧", "Shift+"); if (protyle.disabled) { iconAriaLabel = window.siyuan.languages.rowTip.substring(0, window.siyuan.languages.rowTip.indexOf("`; + html = ``; if (!protyle.disabled) { - html = `${html}`; + html = `${html}`; } break; } diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts index 8f092809b..0f29f4990 100644 --- a/app/src/protyle/ui/initUI.ts +++ b/app/src/protyle/ui/initUI.ts @@ -224,7 +224,8 @@ export const initUI = (protyle: IProtyle) => { } Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${buttonElement.getAttribute("data-node-id")}"]`)).find(item => { if (!isInEmbedBlock(item) && protyle.gutter.isMatchNode(item)) { - const rowItem = item.querySelector(`.av__row[data-id="${buttonElement.dataset.rowId}"]`); + const bodyQueryClass = buttonElement.dataset.groupId ? `.av__body[data-group-id="${buttonElement.dataset.groupId}"] ` : ""; + const rowItem = item.querySelector(bodyQueryClass + `.av__row[data-id="${buttonElement.dataset.rowId}"]`); Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl, .av__row--hl")).forEach(hlItem => { if (item !== hlItem) { hlItem.classList.remove("protyle-wysiwyg--hl");