Vanessa 2024-11-18 11:55:18 +08:00
parent 81ef5d0244
commit e9c8cd0e0d
6 changed files with 87 additions and 38 deletions

View file

@ -28,12 +28,7 @@ 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")) {
const textElement = aElement.querySelector(".av__celltext");
if (textElement.scrollWidth > textElement.clientWidth + 2) {
tip = getCellText(aElement);
}
} else {
if (!aElement.classList.contains("av__cell--header")) {
if (aElement.firstElementChild?.getAttribute("data-type") === "url") {
if (aElement.firstElementChild.textContent.indexOf("...") > -1) {
tip = Lute.EscapeHTMLStr(aElement.firstElementChild.getAttribute("data-href"));