From cad1421cd922a448797176ab1e7536ef8ee1f93a Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 30 Jan 2011 00:41:45 +0400 Subject: [PATCH] moveTextAreaToCursor after updating cursor, to get right position --- lib/ace/editor.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 7394abd1..149cea24 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -280,17 +280,17 @@ var Editor =function(renderer, session) { }; this.onCursorChange = function(e) { - this.$highlightBrackets(); - - // move text input over the cursor - // this is required for iOS and IME - this.renderer.moveTextAreaToCursor(this.textInput.getElement()); - this.renderer.updateCursor(this.getCursorPosition(), this.$overwrite); if (!this.$blockScrolling && (!e || !e.blockScrolling)) { this.renderer.scrollCursorIntoView(); } + + // move text input over the cursor + // this is required for iOS and IME + this.renderer.moveTextAreaToCursor(this.textInput.getElement()); + + this.$highlightBrackets(); this.$updateHighlightActiveLine(); };