Vanessa 2025-03-23 17:55:50 +08:00
parent 2ea76196fe
commit 42d8868b24

View file

@ -722,9 +722,9 @@ export class WYSIWYG {
}
// table cell select
let tableBlockElement: HTMLElement | false;
const targetCellElemet = hasClosestByTag(target, "TH") || hasClosestByTag(target, "TD");
if (targetCellElemet) {
target = targetCellElemet;
const targetCellElement = hasClosestByTag(target, "TH") || hasClosestByTag(target, "TD");
if (targetCellElement) {
target = targetCellElement;
}
if (target.tagName === "TH" || target.tagName === "TD" || target.firstElementChild?.tagName === "TABLE" || target.classList.contains("table__resize") || target.classList.contains("table__select")) {
tableBlockElement = hasClosestBlock(target);
@ -732,6 +732,9 @@ export class WYSIWYG {
tableBlockElement.querySelector(".table__select").removeAttribute("style");
window.siyuan.menus.menu.remove();
hideElements(["toolbar"], protyle);
if (target.classList.contains("table__select")) {
target = document.elementFromPoint(event.clientX, event.clientY) as HTMLElement;
}
event.stopPropagation();
}
// 后续拖拽操作写在多选节点中