mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 821329 Set charCode of keypress event when TextInputHandler::InsertText() is called without native key event r=smichaud
This commit is contained in:
parent
b46981a325
commit
d05e3e3e19
@ -1948,6 +1948,9 @@ TextInputHandler::InsertText(NSAttributedString *aAttrString)
|
||||
}
|
||||
} else {
|
||||
nsCocoaUtils::InitInputEvent(keypressEvent, static_cast<NSEvent*>(nullptr));
|
||||
if (keypressEvent.isChar) {
|
||||
keypressEvent.charCode = str.CharAt(0);
|
||||
}
|
||||
// Note that insertText is not called only at key pressing.
|
||||
if (!keypressEvent.charCode) {
|
||||
keypressEvent.keyCode =
|
||||
|
Loading…
Reference in New Issue
Block a user