# \`enterPointerlock()\` and \`exitPointerlock()\` on pointer down not working for Firefox and Safari

**URL:** https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224
**Category:** Questions
**Created:** [November 26, 2019, 7:01pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224 "2019-11-26T19:01:44Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![i73](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/i73/32/3167_2.png) [@i73](https://forum.babylonjs.com/u/i73)
#### Post date: [November 26, 2019, 7:01pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/1 "2019-11-26T19:01:44Z")

</div>

Line 17 to 25: [https://www.babylonjs-playground.com/#SRZRWV#10](https://www.babylonjs-playground.com/#SRZRWV#10)

I know this is an issue with browsers but when you click in the scene it’s supposed to lock the mouse cursor and allow you to move freely, (works in Chrome) but in FireFox and Safari it locks control until you press escape then you can look around, is there a fix?

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [November 26, 2019, 8:57pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/2 "2019-11-26T20:57:46Z")

</div>

I don’t think so (not directly)

---

<div class="post-metadata">

### Author: ![i73](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/i73/32/3167_2.png) [@i73](https://forum.babylonjs.com/u/i73)
#### Post date: [November 26, 2019, 9:03pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/3 "2019-11-26T21:03:14Z")

</div>

Is there anything I can do? Or even check to see the browser so I can toggle this functionality?

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [November 26, 2019, 9:17pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/4 "2019-11-26T21:17:31Z")

</div>

Maybe we could ask on Firefox bug databse to see if there is a workaround?

---

<div class="post-metadata">

### Author: ![i73](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/i73/32/3167_2.png) [@i73](https://forum.babylonjs.com/u/i73)
#### Post date: [November 26, 2019, 9:21pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/5 "2019-11-26T21:21:14Z")

</div>

I know they do this for security reasons (they don’t want the webpage to control the mouse) so I’ll just disable this for Safari and Firefox, does Babylon support browser checking?

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [November 26, 2019, 9:32pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/6 "2019-11-26T21:32:37Z")

</div>

We do not do it but it is easy to test the user agent 😉

---

<div class="post-metadata">

### Author: ![i73](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/i73/32/3167_2.png) [@i73](https://forum.babylonjs.com/u/i73)
#### Post date: [November 26, 2019, 9:39pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/7 "2019-11-26T21:39:32Z")

</div>

I’m using the Unity toolkit, so it’s not as easy.  
But thank you!

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [November 26, 2019, 9:50pm UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/8 "2019-11-26T21:50:14Z")

</div>

Pinging @MackeyK24 to see if he can expose the data

---

<div class="post-metadata">

### Author: ![MackeyK24](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mackeyk24/32/3741_2.png) [@MackeyK24](https://forum.babylonjs.com/u/MackeyK24)
#### Post date: [November 27, 2019, 12:00am UTC](https://forum.babylonjs.com/t/enterpointerlock-and-exitpointerlock-on-pointer-down-not-working-for-firefox-and-safari/7224/9 "2019-11-27T00:00:56Z")

</div>

Im not quite clear as to what you are trying to do and what the Unity Toolkit is not letting you do.
