Explorar el Código

BugFix: call setScrollTopByLine after setCursor

Yuki Takei hace 8 años
padre
commit
a1c01e03af
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
   }
 
   /**