Skip to content

Commit

Permalink
🎨 #10488
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 30, 2024
1 parent 5158805 commit aec54b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/protyle/wysiwyg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export class WYSIWYG {
// https://github.com/siyuan-note/siyuan/issues/3026
hideElements(["select"], protyle);
}
const target = event.target as HTMLElement;
let target = event.target as HTMLElement;
if (hasClosestByClassName(target, "protyle-action") ||
(hasClosestByClassName(target, "av__cell--header") && !hasClosestByClassName(target, "av__widthdrag"))) {
return;
Expand Down Expand Up @@ -700,6 +700,10 @@ export class WYSIWYG {
}
// table cell select
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")) {
tableBlockElement = hasClosestBlock(target);
if (tableBlockElement) {
Expand Down

0 comments on commit aec54b7

Please sign in to comment.