提交 456d746e 编写于 作者: J Jason Simmons 提交者: GitHub

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

Fixes https://github.com/flutter/flutter/issues/10723
上级 dd634d34
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册