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:
parent
5ea2857521
commit
b577f07e5a
1 changed files with 4 additions and 7 deletions
|
@ -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) {
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue