This commit is contained in:
parent
48f1a7411e
commit
d8614cd594
1 changed files with 6 additions and 1 deletions
|
@ -468,7 +468,12 @@ export class Breadcrumb {
|
|||
if (getSelection().rangeCount > 0) {
|
||||
range = getSelection().getRangeAt(0);
|
||||
if (!protyle.wysiwyg.element.isEqualNode(range.startContainer) && !protyle.wysiwyg.element.contains(range.startContainer)) {
|
||||
blockElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild) || protyle.wysiwyg.element.firstElementChild;
|
||||
if (protyle.element.id ==="searchPreview") {
|
||||
// https://github.com/siyuan-note/siyuan/issues/8807
|
||||
blockElement = hasClosestBlock(protyle.wysiwyg.element.querySelector('[data-type="search-mark"]')) as Element;
|
||||
} else {
|
||||
blockElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild) || protyle.wysiwyg.element.firstElementChild;
|
||||
}
|
||||
} else {
|
||||
blockElement = hasClosestBlock(range.startContainer) as Element;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue