mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 768106 - Ignore empty composing events when we have no composition string to replace. r=blassey
--HG-- extra : rebase_source : 1f236586a1d16b83798b0d10b0199ef01605b03e
This commit is contained in:
parent
8ba0124b9d
commit
729d8709f9
@ -294,7 +294,16 @@ public class GeckoInputConnection
|
||||
|
||||
@Override
|
||||
public boolean setComposingText(CharSequence text, int newCursorPosition) {
|
||||
// setComposingText will likely be called multiple times while we are composing text.
|
||||
// setComposingText() places the given text into the editable, replacing any existing
|
||||
// composing text. This method will likely be called multiple times while we are composing
|
||||
// text.
|
||||
|
||||
// If the replacement composition string is empty and we have no active composition string
|
||||
// to replace, then just ignore the empty string. Some VKBs, such as TouchPal Keyboard,
|
||||
// send us empty strings at inopportune times, deleting committed text. See bug 768106.
|
||||
if (text.length() == 0 && !hasCompositionString())
|
||||
return true;
|
||||
|
||||
clampSelection();
|
||||
return super.setComposingText(text, newCursorPosition);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user