diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index ee09b209..36f89985 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -216,6 +216,8 @@ var TextInput = function(parentNode, host) { } else if (data == PLACEHOLDER.charAt(0)) { if (afterContextMenu) host.execCommand("del", {source: "ace"}); + else // some versions of android do not fire keydown when pressing backspace + host.execCommand("backspace", {source: "ace"}); } else { if (data.substring(0, 2) == PLACEHOLDER) data = data.substr(2); diff --git a/lib/ace/mouse/default_handlers.js b/lib/ace/mouse/default_handlers.js index ebe9e0c7..bff2e2bb 100644 --- a/lib/ace/mouse/default_handlers.js +++ b/lib/ace/mouse/default_handlers.js @@ -109,8 +109,9 @@ function DefaultHandlers(mouseHandler) { pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); var editor = this.editor; // allow double/triple click handlers to change selection + var shiftPressed = this.mousedownEvent.getShiftKey(); setTimeout(function(){ - if (this.mousedownEvent.getShiftKey()) { + if (shiftPressed) { editor.selection.selectToPosition(pos); } else if (!this.$clickSelection) {