mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-10 22:23:28 +08:00
This commit is contained in:
parent
5158805544
commit
aec54b7b9d
@ -437,7 +437,7 @@ export class WYSIWYG {
|
|||||||
// https://github.com/siyuan-note/siyuan/issues/3026
|
// https://github.com/siyuan-note/siyuan/issues/3026
|
||||||
hideElements(["select"], protyle);
|
hideElements(["select"], protyle);
|
||||||
}
|
}
|
||||||
const target = event.target as HTMLElement;
|
let target = event.target as HTMLElement;
|
||||||
if (hasClosestByClassName(target, "protyle-action") ||
|
if (hasClosestByClassName(target, "protyle-action") ||
|
||||||
(hasClosestByClassName(target, "av__cell--header") && !hasClosestByClassName(target, "av__widthdrag"))) {
|
(hasClosestByClassName(target, "av__cell--header") && !hasClosestByClassName(target, "av__widthdrag"))) {
|
||||||
return;
|
return;
|
||||||
@ -700,6 +700,10 @@ export class WYSIWYG {
|
|||||||
}
|
}
|
||||||
// table cell select
|
// table cell select
|
||||||
let tableBlockElement: HTMLElement | false;
|
let tableBlockElement: HTMLElement | false;
|
||||||
|
const targetCellElemet = hasClosestByMatchTag(target, "TH") || hasClosestByMatchTag(target, "TD")
|
||||||
|
if (targetCellElemet) {
|
||||||
|
target = targetCellElemet;
|
||||||
|
}
|
||||||
if (target.tagName === "TH" || target.tagName === "TD" || target.firstElementChild?.tagName === "TABLE" || target.classList.contains("table__resize") || target.classList.contains("table__select")) {
|
if (target.tagName === "TH" || target.tagName === "TD" || target.firstElementChild?.tagName === "TABLE" || target.classList.contains("table__resize") || target.classList.contains("table__select")) {
|
||||||
tableBlockElement = hasClosestBlock(target);
|
tableBlockElement = hasClosestBlock(target);
|
||||||
if (tableBlockElement) {
|
if (tableBlockElement) {
|
||||||
|
Loading…
Reference in New Issue
Block a user