mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Fix non-customizable keybindings not working as expected (#7855)
This commit is contained in:
parent
9db59d75b9
commit
18e86f3bf8
1 changed files with 11 additions and 4 deletions
|
@ -30,9 +30,7 @@ import {
|
|||
KeyBindingAction,
|
||||
} from "./accessibility/KeyboardShortcuts";
|
||||
|
||||
export const getBindingsByCategory = (
|
||||
category: CategoryName,
|
||||
): KeyBinding[] => {
|
||||
export const getBindingsByCategory = (category: CategoryName): KeyBinding[] => {
|
||||
return CATEGORIES[category].settingNames.reduce((bindings, name) => {
|
||||
const value = getCustomizableShortcuts()[name]?.default;
|
||||
if (value) {
|
||||
|
@ -151,7 +149,16 @@ const roomBindings = (): KeyBinding[] => {
|
|||
};
|
||||
|
||||
const navigationBindings = (): KeyBinding[] => {
|
||||
return getBindingsByCategory(CategoryName.NAVIGATION);
|
||||
const bindings = getBindingsByCategory(CategoryName.NAVIGATION);
|
||||
|
||||
bindings.push({
|
||||
action: "KeyBinding.closeDialogOrContextMenu" as KeyBindingAction,
|
||||
keyCombo: {
|
||||
key: Key.ESCAPE,
|
||||
},
|
||||
});
|
||||
|
||||
return bindings;
|
||||
};
|
||||
|
||||
const labsBindings = (): KeyBinding[] => {
|
||||
|
|
Loading…
Reference in a new issue