diff --git a/plugins/node_modules/ace/lib/ace/editor.js b/plugins/node_modules/ace/lib/ace/editor.js index 09bd1192..1ec567f0 100644 --- a/plugins/node_modules/ace/lib/ace/editor.js +++ b/plugins/node_modules/ace/lib/ace/editor.js @@ -640,6 +640,13 @@ Editor.$uid = 0; * Brings the current `textInput` into focus. **/ this.focus = function() { + // Safari needs the timeout + // iOS and Firefox need it called immediately + // to be on the save side we do both + var _self = this; + setTimeout(function() { + _self.textInput.focus(); + }); this.textInput.focus(); }; diff --git a/plugins/node_modules/ace/lib/ace/selection.js b/plugins/node_modules/ace/lib/ace/selection.js index 00adf55d..a5824f10 100644 --- a/plugins/node_modules/ace/lib/ace/selection.js +++ b/plugins/node_modules/ace/lib/ace/selection.js @@ -211,7 +211,7 @@ var Selection = function(session) { * Selects all the text in the document. **/ this.selectAll = function() { - this.anchor.setPosition(0, 0); + this.setSelectionAnchor(0, 0); this.cursor.setPosition(Number.MAX_VALUE, Number.MAX_VALUE); };