Do not trap Key ContextMenu into composer for keyboard a11y
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
f4b1c4f360
commit
3ad4b0fb64
|
@ -78,6 +78,7 @@ export const Key = {
|
|||
CONTROL: "Control",
|
||||
META: "Meta",
|
||||
SHIFT: "Shift",
|
||||
CONTEXT_MENU: "ContextMenu",
|
||||
|
||||
LESS_THAN: "<",
|
||||
GREATER_THAN: ">",
|
||||
|
|
|
@ -401,6 +401,11 @@ const LoggedInView = createReactClass({
|
|||
const isClickShortcut = ev.target !== document.body &&
|
||||
(ev.key === Key.SPACE || ev.key === Key.ENTER);
|
||||
|
||||
// Do not capture the context menu key to improve keyboard accessibility
|
||||
if (ev.key === Key.CONTEXT_MENU) {
|
||||
return;
|
||||
}
|
||||
|
||||
// XXX: Remove after CIDER replaces Slate completely: https://github.com/vector-im/riot-web/issues/11036
|
||||
// If using Slate, consume the Backspace without first focusing as it causes an implosion
|
||||
if (ev.key === Key.BACKSPACE && !SettingsStore.getValue("useCiderComposer")) {
|
||||
|
|
Loading…
Reference in New Issue