diff --git a/templates/file_edit.html b/templates/file_edit.html index 47eccb632d..193ff013b5 100644 --- a/templates/file_edit.html +++ b/templates/file_edit.html @@ -120,7 +120,7 @@
{% trans 'The password will be kept in the server for only 1 hour.' %}
+{% trans "The password will be kept in the server for only 1 hour." %}
@@ -184,6 +184,10 @@ var editor = CodeMirror.fromTextArea($('#docu-view')[0], { if (cursor.yBot >= $(window).height() + $(window).scrollTop() - 60) { $(window).scrollTop($(window).scrollTop() + parseInt($('#file-edit').css('padding-bottom'))); } + // keep the cursor visible when path-op fixed and moving the cursor upward + if (cursor.y - $(window).scrollTop() < $('#path-op').outerHeight()) { + $(window).scrollTop(cursor.y - $('#path-op').outerHeight()); + } }, autofocus: true });