[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri May 3 12:12:31 UTC 2019


 loleaflet/src/map/handler/Map.Keyboard.js |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit ce3b26a7cae4c852cbe7b7757d3b240f86a7435d
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Mon Apr 15 14:34:50 2019 -0400
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 3 14:12:26 2019 +0200

    loleaflet: fix sending 'compositionupdate' event data
    
    Change-Id: I42142f005d0659b64e5332b5acec52f9ac18a89b
    Reviewed-on: https://gerrit.libreoffice.org/70793
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Tested-by: Henry Castro <hcastro at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/70823
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js
index b532c16a7..4e3b51354 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -399,14 +399,11 @@ L.Map.Keyboard = L.Handler.extend({
 	},
 
 	_onIME: function (e) {
-		if (e.type === 'compositionstart' || e.type === 'compositionupdate') {
+		if (e.type === 'compositionstart') {
 			this._isComposing = true; // we are starting composing with IME
-			if (e.originalEvent.data.length > 0) {
-				this._map._docLayer._postCompositionEvent(0, 'input', e.originalEvent.data);
-			}
-		}
-
-		if (e.type === 'compositionend') {
+		} else if (e.type === 'compositionupdate') {
+			this._map._docLayer._postCompositionEvent(0, 'input', e.originalEvent.data);
+		} else if (e.type === 'compositionend') {
 			this._isComposing = false; // stop of composing with IME
 			// get the composited char codes
 			// clear the input now - best to do this ASAP so the input


More information about the Libreoffice-commits mailing list