2
0
Эх сурвалжийг харах

BugFix: set cursor pos with header edit button

Yuki Takei 8 жил өмнө
parent
commit
f3340ddbae

+ 1 - 1
resource/js/components/PageEditor/Editor.js

@@ -102,7 +102,7 @@ export default class Editor extends React.Component {
     const lastLine = editor.getDoc().lastLine();
     editor.scrollIntoView(lastLine);
 
-    const linePosition = Math.max(0, line - 1);
+    const linePosition = Math.max(0, line);
     editor.scrollIntoView(linePosition);
     editor.setCursor({line: linePosition});   // leave 'ch' field as null/undefined to indicate the end of line
   }