guard pointer lock APIs for Mobile Safari

This commit is contained in:
Brian Beck 2026-02-19 06:10:38 -08:00
parent c44df43a91
commit 1121012d91
25 changed files with 29 additions and 25 deletions

View file

@ -176,7 +176,9 @@ export function MapInfoDialog({
useEffect(() => {
if (open) {
dialogRef.current?.focus();
document.exitPointerLock();
try {
document.exitPointerLock();
} catch {}
}
}, [open]);

View file

@ -270,7 +270,9 @@ export function MissionSelect({
placeholder={displayValue}
className="MissionSelect-input"
onFocus={() => {
document.exitPointerLock();
try {
document.exitPointerLock();
} catch {}
combobox.show();
}}
onKeyDown={(e) => {