diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts index ec287d47f..55599cf70 100644 --- a/app/src/block/popover.ts +++ b/app/src/block/popover.ts @@ -7,6 +7,7 @@ import {App} from "../index"; import {Constants} from "../constants"; import {getCellText} from "../protyle/render/av/cell"; import {isTouchDevice} from "../util/functions"; +import {escapeAriaLabel} from "../util/escape"; let popoverTargetElement: HTMLElement; let notebookItemElement: HTMLElement | false; @@ -28,7 +29,17 @@ export const initBlockPopover = (app: App) => { let tooltipClass = ""; let tip = aElement.getAttribute("aria-label"); if (aElement.classList.contains("av__cell")) { - if (!aElement.classList.contains("av__cell--header")) { + if (aElement.classList.contains("av__cell--header")) { + const textElement = aElement.querySelector(".av__celltext"); + const desc = aElement.getAttribute("data-desc") + if (textElement.scrollWidth > textElement.clientWidth + 2 || desc) { + if (desc) { + tip = `${getCellText(aElement)}