loleaflet: fix sending 'compositionupdate' event data

Change-Id: I42142f005d0659b64e5332b5acec52f9ac18a89b
Reviewed-on: https://gerrit.libreoffice.org/70793
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2019-04-15 14:34:50 -04:00
parent 5ea2857521
commit b577f07e5a

View file

@ -392,14 +392,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) {
} else if (e.type === 'compositionupdate') {
this._map._docLayer._postCompositionEvent(0, 'input', e.originalEvent.data);
}
}
if (e.type === 'compositionend') {
} 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