Skip to content

NOW MANAGED ON CODEBERG

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

Abijeet562225a77b1c
diff --git a/resources/assets/js/components/markdown-editor.js b/resources/assets/js/components/markdown-editor.js
index 4e0ba83ba..5688ebd61 100644
--- a/resources/assets/js/components/markdown-editor.js
+++ b/resources/assets/js/components/markdown-editor.js
@@ -416,9 +416,13 @@ class MarkdownEditor {
if (lineNumber !== -1) {
this.cm.scrollIntoView({
line: lineNumber,
- char: lines[lineNumber].length
}, 200);
this.cm.focus();
+ // set the cursor location.
+ this.cm.setCursor({
+ line: lineNumber,
+ char: lines[lineNumber].length
+ })
}
}