mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
This commit is contained in:
parent
26cb2a4976
commit
a91e18919a
1 changed files with 6 additions and 2 deletions
|
|
@ -323,9 +323,13 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
|
||||||
const avMaskElement = document.querySelector(".av__mask");
|
const avMaskElement = document.querySelector(".av__mask");
|
||||||
if (avMaskElement) {
|
if (avMaskElement) {
|
||||||
(avMaskElement.querySelector("textarea, input") as HTMLTextAreaElement)?.focus();
|
(avMaskElement.querySelector("textarea, input") as HTMLTextAreaElement)?.focus();
|
||||||
} else if (!document.querySelector(".av__panel") && !isSearching) {
|
} else if (!document.querySelector(".av__panel") && !isSearching && getSelection().rangeCount > 0) {
|
||||||
|
const range = getSelection().getRangeAt(0);
|
||||||
|
const blockElement = hasClosestBlock(range.startContainer);
|
||||||
|
if (blockElement && e.isSameNode(blockElement)) {
|
||||||
focusBlock(e);
|
focusBlock(e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cellScrollIntoView(e, newCellElement);
|
cellScrollIntoView(e, newCellElement);
|
||||||
}
|
}
|
||||||
selectRowIds.forEach((selectRowId, index) => {
|
selectRowIds.forEach((selectRowId, index) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue