mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04: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:
parent
b936e1f403
commit
562225a77b
@ -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
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user