소스 검색

HUE-6154 [core] Ace paste event shouldn't reset the cursor position

Enrico Berti 8 년 전
부모
커밋
181f585
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 2 - 0
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3569,9 +3569,11 @@
         window.clearInterval(checkEditorValueInterval);
         checkEditorValueInterval = window.setInterval(function () {
           if (lastEditorValue !== editor.getValue()) {
+            var lastKnownPosition = editor.getCursorPosition();
             window.clearInterval(checkEditorValueInterval);
             lastEditorValue = editor.getValue();
             editor.setValue(removeUnicodes(lastEditorValue), 1);
+            editor.moveCursorToPosition(lastKnownPosition);
           }
         }, 10);
       });