This commit is contained in:
Vanessa 2023-11-15 18:40:01 +08:00
parent dc7f763054
commit 5cce04da49
6 changed files with 47 additions and 32 deletions

View file

@ -22,7 +22,7 @@ export const initBlockPopover = (app: App) => {
if (aElement) {
let tip = aElement.getAttribute("aria-label") || aElement.getAttribute("data-inline-memo-content");
if (aElement.classList.contains("av__celltext")) {
if (aElement.offsetWidth > aElement.parentElement.clientWidth - 11) {
if (aElement.offsetWidth > aElement.parentElement.clientWidth - 5) { // 只能减左边 padding换行时字体会穿透到右侧 padding
if (aElement.querySelector(".av__cellicon")) {
tip = `${aElement.firstChild.textContent}${aElement.lastChild.textContent}`;
} else {