mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-20 16:38:21 +01:00
Add focus trap to CallingLobby
This commit is contained in:
@@ -34,6 +34,12 @@ const TooltipEventWrapper = React.forwardRef<
|
||||
onHoverChanged(false);
|
||||
}, [onHoverChanged]);
|
||||
|
||||
const onFocus = React.useCallback(() => {
|
||||
if (window.getInteractionMode() === 'keyboard') {
|
||||
on();
|
||||
}
|
||||
}, [on]);
|
||||
|
||||
React.useEffect(() => {
|
||||
const wrapperEl = wrapperRef.current;
|
||||
|
||||
@@ -52,7 +58,7 @@ const TooltipEventWrapper = React.forwardRef<
|
||||
|
||||
return (
|
||||
<span
|
||||
onFocus={on}
|
||||
onFocus={onFocus}
|
||||
onBlur={off}
|
||||
ref={refMerger<HTMLSpanElement>(ref, wrapperRef)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user