This commit is contained in:
parent
6e5dc8b724
commit
3736319e51
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal
|
|||
if (blockElement.classList.contains("code-block")) {
|
||||
const brElement = document.createElement("br");
|
||||
range.insertNode(brElement);
|
||||
brElement.scrollIntoView({block: "center", behavior});
|
||||
brElement.scrollIntoView({block: "nearest", behavior});
|
||||
brElement.remove();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue