From 4459eaeb9d797d6de269be326b3ff545701d47aa Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 21 Apr 2023 10:18:43 +0100 Subject: [PATCH] Fix audio mute on window blur https://github.com/vector-im/element-call/pull/1015/files missed a change of spacebarHeld to a ref. --- src/useCallViewKeyboardShortcuts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/useCallViewKeyboardShortcuts.ts b/src/useCallViewKeyboardShortcuts.ts index 11ea8f0..b0ce527 100644 --- a/src/useCallViewKeyboardShortcuts.ts +++ b/src/useCallViewKeyboardShortcuts.ts @@ -88,7 +88,7 @@ export function useCallViewKeyboardShortcuts( window, "blur", useCallback(() => { - if (spacebarHeld) { + if (spacebarHeld.current) { spacebarHeld.current = false; setMicrophoneMuted(true); }