diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx
index 9ec6921ae2..6d1ea9f8eb 100644
--- a/src/components/views/rooms/RoomHeader.tsx
+++ b/src/components/views/rooms/RoomHeader.tsx
@@ -125,30 +125,45 @@ export default function RoomHeader({
);
+
const joinCallButton = (
-
+
+
+
);
- const [menuOpen, setMenuOpen] = useState(false);
+
const callIconWithTooltip = (
);
+
+ const [menuOpen, setMenuOpen] = useState(false);
+
+ const onOpenChange = useCallback(
+ (newOpen: boolean) => {
+ if (!videoCallDisabledReason) setMenuOpen(newOpen);
+ },
+ [videoCallDisabledReason],
+ );
+
const startVideoCallButton = (
<>
{/* Can be either a menu or just a button depending on the number of call options.*/}
{callOptions.length > 1 ? (