mirror of https://github.com/vector-im/riot-web
Limit Backspace-consuming workaround to just Slate, tidy Keyboard :)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
dc9018dc11
commit
1ec0bb284a
|
@ -66,7 +66,10 @@ export const Key = {
|
|||
End: "End",
|
||||
PAGE_UP: "PageUp",
|
||||
PAGE_DOWN: "PageDown",
|
||||
BACKSPACE: "Backspace",
|
||||
BACKTICK: "`",
|
||||
SPACE: " ",
|
||||
ENTER: "Enter",
|
||||
|
||||
K: "k",
|
||||
};
|
||||
|
|
|
@ -399,10 +399,11 @@ const LoggedInView = createReactClass({
|
|||
ev.preventDefault();
|
||||
} else if (!hasModifier) {
|
||||
const isClickShortcut = ev.target !== document.body &&
|
||||
(ev.key === "Space" || ev.key === "Enter");
|
||||
(ev.key === Key.SPACE || ev.key === Key.ENTER);
|
||||
|
||||
// XXX: Remove after CIDER replaces Slate completely: https://github.com/vector-im/riot-web/issues/11036
|
||||
if (ev.key === "Backspace") {
|
||||
// If using Slate, consume the Backspace without first focusing as it causes an implosion
|
||||
if (ev.key === Key.BACKSPACE && !SettingsStore.getValue("useCiderComposer")) {
|
||||
ev.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue