From 3ab631640b53bac7bff8ac5ce895c995f2058fd3 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 5 Nov 2013 21:01:01 +0400 Subject: [PATCH 1/3] fix #1669 Everything until cursor position is selected in IE8 --- lib/ace/mouse/default_handlers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ace/mouse/default_handlers.js b/lib/ace/mouse/default_handlers.js index ebe9e0c7..daee58ce 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 shiftPresed = this.mousedownEvent.getShiftKey(); setTimeout(function(){ - if (this.mousedownEvent.getShiftKey()) { + if (shiftPresed) { editor.selection.selectToPosition(pos); } else if (!this.$clickSelection) { From bfdd7239d176a0e9d13ffaf81189fc79aa64450e Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 5 Nov 2013 21:07:29 +0400 Subject: [PATCH 2/3] fix #1671 Cannot use backspace in Android Chrome --- lib/ace/keyboard/textinput.js | 2 ++ 1 file changed, 2 insertions(+) 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); From 68c6c4e86c1e1fc9ceb254f45d8024b09b5d848a Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 5 Nov 2013 21:23:25 +0400 Subject: [PATCH 3/3] fix typo --- lib/ace/mouse/default_handlers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/mouse/default_handlers.js b/lib/ace/mouse/default_handlers.js index daee58ce..bff2e2bb 100644 --- a/lib/ace/mouse/default_handlers.js +++ b/lib/ace/mouse/default_handlers.js @@ -109,9 +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 shiftPresed = this.mousedownEvent.getShiftKey(); + var shiftPressed = this.mousedownEvent.getShiftKey(); setTimeout(function(){ - if (shiftPresed) { + if (shiftPressed) { editor.selection.selectToPosition(pos); } else if (!this.$clickSelection) {