Yuki Takei 4 лет назад
Родитель
Сommit
26721622bc
2 измененных файлов с 3 добавлено и 0 удалено
  1. 1 0
      CHANGES.md
  2. 2 0
      src/client/js/components/PageEditor/CodeMirrorEditor.jsx

+ 1 - 0
CHANGES.md

@@ -2,6 +2,7 @@
 
 ## v4.2.21-RC
 
+* Improvement: Codemirror is now scrollable one editor height of empty space into view at the bottom of the editor
 * Improvement: Upgrade mongodb driver to fix [NODE-2784](https://jira.mongodb.org/browse/NODE-2784)
 * Support: Upgrade libs
     * connect-mongo

+ 2 - 0
src/client/js/components/PageEditor/CodeMirrorEditor.jsx

@@ -47,6 +47,7 @@ require('codemirror/addon/search/searchcursor');
 require('codemirror/addon/search/match-highlighter');
 require('codemirror/addon/selection/active-line');
 require('codemirror/addon/scroll/annotatescrollbar');
+require('codemirror/addon/scroll/scrollpastend');
 require('codemirror/addon/fold/foldcode');
 require('codemirror/addon/fold/foldgutter');
 require('codemirror/addon/fold/foldgutter.css');
@@ -845,6 +846,7 @@ export default class CodeMirrorEditor extends AbstractEditor {
             tabSize: 4,
             indentUnit: this.props.indentSize,
             lineWrapping: true,
+            scrollPastEnd: true,
             autoRefresh: { force: true }, // force option is enabled by autorefresh.ext.js -- Yuki Takei
             autoCloseTags: true,
             placeholder,