[Libreoffice-commits] online.git: loleaflet/src

Mihai Varga mihai.varga at collabora.com
Mon Jun 29 01:37:22 PDT 2015


 loleaflet/src/layer/tile/TileLayer.js |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit bed964c00d43d0860d4dc45774b9d71d84ab3439
Author: Mihai Varga <mihai.varga at collabora.com>
Date:   Mon Jun 29 11:37:02 2015 +0300

    Fix backspace input on chrome

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index f83038d..9f95f3a 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -806,7 +806,11 @@ L.TileLayer = L.GridLayer.extend({
 
 		var charCode = e.originalEvent.charCode;
 		var keyCode = e.originalEvent.keyCode;
-		if (e.type === 'keypress') {
+		if (e.type === 'keydown' && keyCode === 8) {
+			// chrome backspace
+			this._postKeyboardEvent('input', charCode, this._toUNOKeyCode(keyCode));
+		}
+		else if (e.type === 'keypress') {
 			if (charCode === keyCode && charCode !== 13) {
 				// Chrome sets keyCode = charCode for printable keys
 				// while LO requires it to be 0


More information about the Libreoffice-commits mailing list