Ver Fonte

BugFix: call setScrollTopByLine after setCursor

Yuki Takei há 8 anos atrás
pai
commit
a1c01e03af
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      resource/js/components/PageEditor/Editor.js

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

@@ -104,8 +104,8 @@ export default class Editor extends React.Component {
     const editor = this.getCodeMirror();
     const linePosition = Math.max(0, line);
 
-    this.setScrollTopByLine(linePosition);
     editor.setCursor({line: linePosition});   // leave 'ch' field as null/undefined to indicate the end of line
+    this.setScrollTopByLine(linePosition);
   }
 
   /**