The Pointer Lock API works in Chrome 22+, Edge 13+, Firefox 50+, Safari 10.1+, and Opera 15+. iOS, Samsung Internet, and IE do not support it. Learn the API.

Prince Dewani
May 1, 2026
The Pointer Lock API is a W3C JavaScript API that locks the cursor to one element, hides it, and reports raw mouse movement deltas. It works in Chrome 22+, Edge 13+, Firefox 50+, Safari 10.1+ on macOS, and Opera 15+, while Safari on iOS, Chrome for Android, Samsung Internet, and Internet Explorer do not support it.
This guide covers what the Pointer Lock API is, the browsers that support it, the key features, the mobile gap, and the known issues.
The Pointer Lock API is a W3C JavaScript API that locks the mouse pointer to a target element through Element.requestPointerLock and reports cursor movement as movementX and movementY deltas on every MouseEvent. The cursor is hidden and stops at no screen boundary, so first-person games and 3D apps get unbounded raw input.
The Pointer Lock API works in Chrome 22+, Edge 13+, Firefox 50+, Safari 10.1+ on macOS, and Opera 15+ on desktop, while every iOS browser, Samsung Internet, Chrome for Android, and Internet Explorer leave it out.
Chrome supports the Pointer Lock API from Chrome 22 on Windows, macOS, Linux, and ChromeOS. Chrome 16 to 21 had it disabled by default behind a chrome://flags entry. Chrome 4 to 15 did not support it. Chrome for Android does not expose pointer lock in any version, since touch-first devices have no system cursor to lock.
Microsoft Edge supports the Pointer Lock API from Edge 13 on Windows. The Chromium-based Edge 79 and newer ships it by default on Windows, macOS, and Linux. Edge 12 did not support pointer lock. Edge on Android does not expose the API, since the mobile build inherits the Chromium-on-Android behavior.
Firefox supports the Pointer Lock API from Firefox 50 on Windows, macOS, and Linux, with full unprefixed support and no flag. Firefox 14 to 49 shipped a moz-prefixed mozRequestPointerLock and required a fullscreen element first. Firefox 2 to 13 did not support it. Firefox for Android exposes the API only when a Bluetooth or USB OTG mouse is paired.
Safari supports the Pointer Lock API from Safari 10.1 on macOS. Safari 3.1 to 10 did not support it. Safari on iOS and iPadOS does not support pointer lock in any version, including iOS 26 and iPadOS 26, since Apple WebKit has not enabled the feature on touch-first devices. Safari on visionOS also lacks the API.
Opera supports the Pointer Lock API from Opera 15 on Windows, macOS, and Linux, the version where Opera switched to the Blink engine. Opera 9 to 12.1 did not support it. Opera Mini does not support pointer lock. Opera Mobile on Android also does not expose the API.
Samsung Internet does not support the Pointer Lock API in any version on Galaxy phones or tablets. The Samsung Internet engine is Chromium-based, but the team has not turned on pointer lock on Android because mobile screens have no default mouse pointer. There is no flag inside the app that turns it on.
The legacy stock Android Browser, Chrome for Android, Edge on Android, and Opera Mobile do not support the Pointer Lock API. Mobile Chromium builds disable the feature on touch-only devices. Firefox for Android is the only Android browser that ships pointer lock, and it only fires when a paired Bluetooth or USB OTG mouse is connected.
Internet Explorer does not support the Pointer Lock API in any version, including Internet Explorer 11. The Trident engine never added the raw mouse delta plumbing the spec needs. Microsoft has retired Internet Explorer, so move pointer-locked games and 3D apps to Chromium-based Edge, Chrome, or Firefox for any new work.
Note: The Pointer Lock API breaks across Safari on iOS, Samsung Internet, and Chrome for Android. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
The Pointer Lock API is a small surface that pairs an entry method with movement deltas, lock-state events, and a fullscreen-friendly exit gesture. Every feature is exposed off Element, Document, and MouseEvent.
The Pointer Lock API is built for any UI that wants raw, unbounded mouse motion without a visible cursor. The strongest fit is interactive 3D, but it carries any drag-rotate or scrub interaction that should not stop at the screen edge.
The Pointer Lock API does not work on iOS, iPadOS, or any Chromium mobile browser, and only Firefox for Android exposes it when a Bluetooth or USB mouse is paired. Mobile pages that need camera or pan control should fall back to Pointer Events or Touch Events instead.
Try the feature-detection snippet in the next section on a phone and the console will print "Pointer Lock API is not supported in this browser" on every Chromium-based mobile build.
Pointer lock has shipped on Chromium for over a decade, but the surface still has a few sharp corners around user gestures, iframes, exit shortcuts, and cross-engine drift on options. Test the lock path on every target browser before you ship.
Paste the snippet below into the DevTools console of Chrome, Edge, Firefox, or Safari on macOS. Click anywhere on the page once and the cursor should disappear, with movement deltas printing on each frame.
// Paste this into the DevTools console to feature-detect Pointer Lock and start a lock on click.
const target = document.body;
if ("requestPointerLock" in target) {
console.log("Pointer Lock API is available.");
target.addEventListener("click", async () => {
try {
const result = target.requestPointerLock({ unadjustedMovement: true });
if (result && typeof result.then === "function") {
await result;
}
console.log("Pointer is locked.");
} catch (error) {
console.log("Lock rejected:", error.name);
}
});
document.addEventListener("pointerlockchange", () => {
const locked = document.pointerLockElement === target;
console.log(locked ? "Locked." : "Released.");
});
document.addEventListener("mousemove", (event) => {
if (document.pointerLockElement === target) {
console.log("dx", event.movementX, "dy", event.movementY);
}
});
} else {
console.log("Pointer Lock API is not supported in this browser.");
}In my experience, the most surprising failure is the iframe sandbox token. A perfectly working pointer-lock demo embedded inside a CodePen or JSFiddle preview suddenly throws SecurityError, because the parent page sandboxes the frame without allow-pointer-lock. The fix is one attribute on the iframe, but the error message points at the wrong layer.
All Pointer Lock API version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance