Edge case link widget fix

This commit is contained in:
Zef Hemel
2022-11-29 09:17:40 +01:00
parent 6a047e1ef4
commit a0670768e8
2 changed files with 13 additions and 8 deletions
+2 -2
View File
@@ -304,8 +304,8 @@ export class Editor {
let initialCursorPos = 0;
const match = frontMatterRegex.exec(pageText);
if (match) {
// Frotnmatter found, put cursor after it
initialCursorPos = match[0].length;
// Frontmatter found, put cursor after it
initialCursorPos = match[0].length + 1;
}
// By default scroll to the top
this.editorView.scrollDOM.scrollTop = 0;