mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-07 21:22:34 +01:00
This commit is contained in:
parent
2d47cb3684
commit
87bd6267b7
1 changed files with 2 additions and 1 deletions
|
|
@ -941,7 +941,8 @@ export const openSearchEditor = (options: {
|
|||
const rangeBlockElement = hasClosestBlock(currentRange.startContainer);
|
||||
if (rangeBlockElement) {
|
||||
options.id = rangeBlockElement.getAttribute("data-node-id");
|
||||
const offset = getSelectionOffset(getContenteditableElement(rangeBlockElement), null, options.protyle.highlight.ranges[options.protyle.highlight.rangeIndex]);
|
||||
const offset = getSelectionOffset(getContenteditableElement(rangeBlockElement) || rangeBlockElement,
|
||||
null, options.protyle.highlight.ranges[options.protyle.highlight.rangeIndex]);
|
||||
const scrollAttr: IScrollAttr = {
|
||||
rootId: options.protyle.block.rootID,
|
||||
focusId: options.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue