diff --git a/src/ace/Editor.js b/src/ace/Editor.js index d82c3ce2..ba61e99c 100644 --- a/src/ace/Editor.js +++ b/src/ace/Editor.js @@ -48,6 +48,7 @@ var Editor = function(renderer, doc) { }); this.setDocument(doc || new Document("")); + this.focus(); }; (function(){ diff --git a/src/ace/TextInput.js b/src/ace/TextInput.js index d2a0dbf3..7aa13336 100644 --- a/src/ace/TextInput.js +++ b/src/ace/TextInput.js @@ -100,8 +100,9 @@ var TextInput = function(parentNode, host) { }); this.focus = function() { - text.focus(); + host.onFocus(); text.select(); + text.focus(); }; this.blur = function() {