TypeError: Cannot read property 2 of undefined

Reproduce this error by:

  1. Go to playground with chrome
  2. Open devtools
  3. Click toggle device toolbar button.
  4. left click the babylon scene and then click devtools

error

This is where the error occurs:

Pinging @PolygonalSun

Lemme take a look and see what’s going on

So just an update on this, it looks like with how this is checking each of the pointerIds, it’s also trying to work with ids that have already been resolved and removed. I have a fix incoming today that should take care of this issue.

2 Likes

This issue is fixed by this PR: Properly register pointerUp event for touch input when window is blurred by PolygonalSun · Pull Request #9913 · BabylonJS/Babylon.js (github.com)

2 Likes