move text area to cursor only when cursor is moved

This commit is contained in:
nightwing 2012-04-02 23:55:15 +04:00
commit 2f6a6ce7e0
5 changed files with 30 additions and 29 deletions

View file

@ -80,6 +80,7 @@ var Editor = function(renderer, session) {
this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
this.renderer.textarea = this.textInput.getElement();
this.keyBinding = new KeyBinding(this);
// TODO detect touch event support
@ -385,11 +386,7 @@ var Editor = function(renderer, session) {
this.$cursorChange = function() {
this.renderer.updateCursor();
// move text input over the cursor
// this is required for iOS and IME
this.renderer.moveTextAreaToCursor(this.textInput.getElement());
}
};
/**
* Editor@onDocumentChange(e)