mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-16 10:44:38 +00:00
more logging
This commit is contained in:
@@ -33,6 +33,9 @@ const mayReceiveKeyEvents = (): boolean => {
|
||||
const noPrimaryFocus =
|
||||
nothingInFocus || root.contains(focusElement) || focusOnBody;
|
||||
|
||||
logger.warn(
|
||||
`[mayReceiveKeyEvents] nothingInFocus ${nothingInFocus}, focusOnBody ${focusOnBody}, noPrimaryFocus ${noPrimaryFocus}`,
|
||||
);
|
||||
// Only if we do not have a primary focus we allow keyboard shortcut events.
|
||||
return noPrimaryFocus;
|
||||
};
|
||||
@@ -103,6 +106,7 @@ export function useCallViewKeyboardShortcuts(
|
||||
event.preventDefault();
|
||||
sendReaction?.(KeyToReactionMap[event.key]);
|
||||
} else if (event.key === "Escape") {
|
||||
logger.info("Escape key pressed, triggering onBackButtonPressed");
|
||||
window.controls.onBackButtonPressed?.();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user