1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 15:42:41 +01:00

Added code to set the cursor at end of line while scrolling.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
This commit is contained in:
Abijeet 2018-06-10 17:04:54 +05:30
parent b936e1f403
commit 562225a77b

View File

@ -416,9 +416,13 @@ class MarkdownEditor {
if (lineNumber !== -1) { if (lineNumber !== -1) {
this.cm.scrollIntoView({ this.cm.scrollIntoView({
line: lineNumber, line: lineNumber,
char: lines[lineNumber].length
}, 200); }, 200);
this.cm.focus(); this.cm.focus();
// set the cursor location.
this.cm.setCursor({
line: lineNumber,
char: lines[lineNumber].length
})
} }
} }