mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
This commit is contained in:
parent
2ea76196fe
commit
42d8868b24
1 changed files with 6 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
// 后续拖拽操作写在多选节点中
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue