Merge pull request #1674 from ajaxorg/misc

fix two small bugs
This commit is contained in:
Lennart Kats 2013-11-05 09:24:15 -08:00
commit 2476f43aa8
2 changed files with 4 additions and 1 deletions

View file

@ -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);

View file

@ -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) {