mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-03-06 05:50:34 +00:00
guard pointer lock APIs for Mobile Safari
This commit is contained in:
parent
c44df43a91
commit
1121012d91
25 changed files with 29 additions and 25 deletions
|
|
@ -176,7 +176,9 @@ export function MapInfoDialog({
|
|||
useEffect(() => {
|
||||
if (open) {
|
||||
dialogRef.current?.focus();
|
||||
document.exitPointerLock();
|
||||
try {
|
||||
document.exitPointerLock();
|
||||
} catch {}
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,9 @@ export function MissionSelect({
|
|||
placeholder={displayValue}
|
||||
className="MissionSelect-input"
|
||||
onFocus={() => {
|
||||
document.exitPointerLock();
|
||||
try {
|
||||
document.exitPointerLock();
|
||||
} catch {}
|
||||
combobox.show();
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue