1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

unbreak modifier+space (e.g. emoji insert on macOS)

This commit is contained in:
Matthew Hodgson
2018-07-09 00:58:35 +01:00
parent 37d4bce12d
commit c490f873e3

View File

@@ -712,6 +712,10 @@ export default class MessageComposerInput extends React.Component {
};
onSpace = (ev: KeyboardEvent, change: Change): Change => {
if (ev.metaKey || ev.altKey || ev.shiftKey || ev.ctrlKey) {
return;
}
// drop a point in history so the user can undo a word
// XXX: this seems nasty but adding to history manually seems a no-go
ev.preventDefault();