Fix backspace without slate focus killing everything
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
359d2fee5f
commit
a9b4abaf78
1 changed files with 6 additions and 0 deletions
|
@ -401,6 +401,12 @@ const LoggedInView = createReactClass({
|
||||||
const isClickShortcut = ev.target !== document.body &&
|
const isClickShortcut = ev.target !== document.body &&
|
||||||
(ev.key === "Space" || ev.key === "Enter");
|
(ev.key === "Space" || ev.key === "Enter");
|
||||||
|
|
||||||
|
// XXX: Remove after CIDER replaces Slate completely: https://github.com/vector-im/riot-web/issues/11036
|
||||||
|
if (ev.key === "Backspace") {
|
||||||
|
ev.stopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isClickShortcut && !canElementReceiveInput(ev.target)) {
|
if (!isClickShortcut && !canElementReceiveInput(ev.target)) {
|
||||||
// synchronous dispatch so we focus before key generates input
|
// synchronous dispatch so we focus before key generates input
|
||||||
dis.dispatch({action: 'focus_composer'}, true);
|
dis.dispatch({action: 'focus_composer'}, true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue