# Event has no pointerId in 4.2.0-alpha.27

**URL:** <https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971>\
**Category:** Bugs\
**Created:** [July 29, 2020, 1:30pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971 "2020-07-29T13:30:47Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![kutomer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kutomer/32/55_2.png) [@kutomer](https://forum.babylonjs.com/u/kutomer)\
**Post date:** [July 29, 2020, 1:30pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/1 "2020-07-29T13:30:47Z")

</div>

Hello guys,

I’m testing the new version (upgrading from `"@babylonjs/core": "4.1.0"` to `4.2.0-alpha.27`, and noticed an API change that I wasn’t expecting.

When using: `scene.onPrePointerObservable.add` the `event.event.pointerId` is undefined on safari desktop (I guess that it might be undefined on different browsers as well) the pointerId is used to identify the “finger” in multi-touch screens.  
The only change I made was upgrading babylon version and then I noticed the bug.

I would very much appreciate your help in this matter.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [July 29, 2020, 1:34pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/2 "2020-07-29T13:34:39Z")

</div>

Let me check that…

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 29, 2020, 1:51pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/3 "2020-07-29T13:51:23Z")

</div>

The main thing we change was relying on mouse vs pointer events on Safari due to their latest updates. Hope that might help you @Cedric.

The thing is there is no touch screen on safari desktop so no multitouch 🙂

---

<div class="post-metadata">

**Author:** ![kutomer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kutomer/32/55_2.png) [@kutomer](https://forum.babylonjs.com/u/kutomer)\
**Post date:** [July 29, 2020, 7:35pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/4 "2020-07-29T19:35:59Z")

</div>

I’m not sure if there are any plans on implementing multi touch APIs for desktops (trackpads for instance) if not I think it will be better to at least set the pointerId to 1 for backward compatibility.  
thanks a lot 🙂

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [July 29, 2020, 7:46pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/5 "2020-07-29T19:46:57Z")

</div>

Yes, that’s my guess. Preserve compat with a valid pointerid

---

<div class="post-metadata">

**Author:** ![kutomer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kutomer/32/55_2.png) [@kutomer](https://forum.babylonjs.com/u/kutomer)\
**Post date:** [July 31, 2020, 2:57pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/6 "2020-07-31T14:57:55Z")

</div>

Hi @Cedric any news?

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [July 31, 2020, 3:06pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/7 "2020-07-31T15:06:08Z")

</div>

It’s on my task list. I’ll do it hopefully first days of next week.

---

<div class="post-metadata">

**Author:** ![kutomer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kutomer/32/55_2.png) [@kutomer](https://forum.babylonjs.com/u/kutomer)\
**Post date:** [August 1, 2020, 3:03pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/8 "2020-08-01T15:03:15Z")

</div>

That’s awesome, thanks a lot!

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [August 3, 2020, 2:57pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/9 "2020-08-03T14:57:08Z")

</div>

PR [pointerid compatibility for Safari by CedricGuillemet · Pull Request #8670 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/8670)

---

<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:** [August 3, 2020, 4:24pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/10 "2020-08-03T16:24:55Z")

</div>

Merged!

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [August 3, 2020, 6:58pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/11 "2020-08-03T18:58:29Z")

</div>

this is happening for more then Safari

```auto
    at HTMLCanvasElement._onPointerMove (babylon.js:16)

```

On my chrome browser as well.

With this new PR fix that also?

---

<div class="post-metadata">

**Author:** ![kvasss](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kvasss/32/3774_2.png) [@kvasss](https://forum.babylonjs.com/u/kvasss)\
**Post date:** [August 3, 2020, 7:13pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/12 "2020-08-03T19:13:35Z")

</div>

Hi. problem still there on chrome in v4.2.0-alpha.28 [программа для Web - скриншотов](http://screenshot.su/show.php?img=eae821e6f9187ee1107cc203621d08d4.jpg)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [August 3, 2020, 9:25pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/13 "2020-08-03T21:25:20Z")

</div>

I think there’s a problem with the PR, here’s another one that should fix the problem:

> <https://github.com/BabylonJS/Babylon.js/pull/8674>

---

<div class="post-metadata">

**Author:** ![tommy.qichang](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tommy.qichang/32/10224_2.png) [@tommy.qichang](https://forum.babylonjs.com/u/tommy.qichang)\
**Post date:** [August 3, 2020, 9:59pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/14 "2020-08-03T21:59:26Z")

</div>

Hi all,

I’m not sure if such quick fix lead to some other issues here. But I did encounter the error today…  
When I use `<script src="https://preview.babylonjs.com/babylon.js"></script>` in my demo, there’s an error when loading.

> Uncaught TypeError: Cannot assign to read only property ‘pointerId’ of object ‘#’  
> at HTMLCanvasElement.\_onPointerMove (babylon.js:16)

If I replace the preview version with `<script src="https://cdn.babylonjs.com/babylon.max.js"></script>`, the error is gone.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [August 3, 2020, 10:01pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/15 "2020-08-03T22:01:12Z")

</div>

This is fixed by the PR above (not deployed yet, though).

---

<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:** [August 3, 2020, 10:45pm UTC](https://forum.babylonjs.com/t/event-has-no-pointerid-in-4-2-0-alpha-27/12971/16 "2020-08-03T22:45:29Z")

</div>

Deployed to npm already with alpha 29
