Do not enter text for key events that are not associated with a character (flutter/engine#3860)

Fixes https://github.com/flutter/flutter/issues/10723
This commit is contained in:
Jason Simmons
2017-07-10 17:41:14 -07:00
committed by GitHub
parent a9fd7aeb98
commit e0315eb27d

View File

@@ -139,7 +139,9 @@ class InputConnectionAdaptor extends BaseInputConnection {
}
} else {
// Enter a character.
commitText(String.valueOf(event.getNumber()), 1);
int character = event.getUnicodeChar();
if (character != 0)
commitText(String.valueOf((char) character), 1);
}
}
return result;