Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The pointerlockerror event is fired when locking the pointer failed (for technical reasons or because the permission was denied).
This event is not cancelable and does not bubble.
Use the event name in methods like addEventListener(), or set an event handler property.
A generic Event.
Using addEventListener():
Using the onpointerlockerror event handler property:
| Pointer Lock 2.0 # pointerlockchange-and-pointerlockerror-events |
| Pointer Lock 2.0 # dom-document-onpointerlockerror |
Enable JavaScript to view this browser compatibility table.
This page was last modified on May 2, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.