mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
This commit is contained in:
parent
45e6ee96c1
commit
bcb725f0ad
2 changed files with 4 additions and 1 deletions
|
|
@ -482,7 +482,7 @@ const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScr
|
|||
if (scrollAttr && scrollAttr.focusId) {
|
||||
range = focusByOffset(focusElement, scrollAttr.focusStart, scrollAttr.focusEnd) as Range;
|
||||
} else {
|
||||
focusBlock(focusElement, undefined, action.includes(Constants.CB_GET_OUTLINE) ? false : true);
|
||||
range = focusBlock(focusElement, undefined, !action.includes(Constants.CB_GET_OUTLINE)) as Range;
|
||||
}
|
||||
/// #if !MOBILE
|
||||
if (!action.includes(Constants.CB_GET_UNUNDO)) {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@ export const getContenteditableElement = (element: Element): Element => {
|
|||
if (!element) {
|
||||
return element;
|
||||
}
|
||||
if (element.classList.contains("protyle-title__input")) {
|
||||
return element;
|
||||
}
|
||||
let blockElement = element;
|
||||
if (!blockElement.getAttribute("data-node-id")) {
|
||||
blockElement = element.querySelector("[data-node-id]");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue