Skip to content

Commit 18bf515

Browse files
committed
fix(RenderWindowInteractor): guard against undefined exitPointerLock
Certain versions of Safari on iOS do not implement document.exitPointerLock.
1 parent 86adc56 commit 18bf515

File tree

1 file changed

+1
-1
lines changed
  • Sources/Rendering/Core/RenderWindowInteractor

1 file changed

+1
-1
lines changed

Sources/Rendering/Core/RenderWindowInteractor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
430430
};
431431

432432
//----------------------------------------------------------------------
433-
publicAPI.exitPointerLock = () => document.exitPointerLock();
433+
publicAPI.exitPointerLock = () => document.exitPointerLock?.();
434434

435435
//----------------------------------------------------------------------
436436
publicAPI.isPointerLocked = () =>

0 commit comments

Comments
 (0)