From 6299e188a4bcd680087822b59dfa3d6ab9bb30e1 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 26 May 2018 02:11:20 +0100 Subject: [PATCH] unbreak keyboard shortcuts & ctrl-backspace --- src/components/views/rooms/MessageComposerInput.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index f1a4fd5140..d2730027d1 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -716,7 +716,7 @@ export default class MessageComposerInput extends React.Component { if (ctrlCmdCommand) { return this.handleKeyCommand(ctrlCmdCommand); } - return false; + return; } switch (ev.keyCode) { @@ -739,6 +739,10 @@ export default class MessageComposerInput extends React.Component { }; onBackspace = (ev: Event, change: Change): Change => { + if (ev.ctrlKey || ev.metaKey || ev.altKey || ev.ctrlKey || ev.shiftKey) { + return; + } + if (this.state.isRichTextEnabled) { // let backspace exit lists const isList = this.hasBlock('list-item');