Skip to content

Commit

Permalink
always call exitPointerLock
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsbajorics committed Oct 2, 2024
1 parent 229b68b commit a1d2531
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions editor/src/uuiui/inputs/number-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,7 @@ export const NumberInput = React.memo<NumberInputProps>(

const cancelPointerLock = React.useCallback(
(revertChanges: 'revert-nothing' | 'revert-changes') => {
if (document.pointerLockElement === pointerOriginRef.current) {
document.exitPointerLock()
}
document.exitPointerLock()
if (
revertChanges === 'revert-changes' &&
onSubmitValue != null &&
Expand Down

0 comments on commit a1d2531

Please sign in to comment.