Don't focus composer on key press if modifier is also pressed

This commit is contained in:
Simon Ser 2021-06-22 17:25:24 +02:00
parent 0d36e8a3fc
commit 095006e961

View file

@ -63,6 +63,11 @@ export default class Composer extends Component {
return; return;
} }
// If a modifier is pressed, reserve for key bindings.
if (event.altKey || event.ctrlKey || event.metaKey) {
return;
}
// Ignore events that don't produce a Unicode string. If the key event // Ignore events that don't produce a Unicode string. If the key event
// result in a character being typed by the user, KeyboardEvent.key // result in a character being typed by the user, KeyboardEvent.key
// will contain the typed string. The key string may contain one // will contain the typed string. The key string may contain one