Clicking outside of canvas used by BabylonJS engine generates a POINTERMOVE event

Hi, this started to happen just today, yesterday it was all fine (I’m using preview release).

Clicking outside of canvas used by BabylonJS engine generates a POINTERMOVE event.

It correctly does not generate POINTERDOWN and POINTERUP events but it does generate POINTERMOVE when you click.
Interestingly POINTERMOVE is generated only once for clicking in the same place. So if you move your mouse to a different place (still outside of BabylonJS canvas) and click again, another POINTERMOVE is generated but if you don’t move your mouse in between clicks, it’s not generated.

Easy to reproduce, just add onPointerObservable to the scene and click somewhere on the page outside of BabylonJS canvas.

I believe it might be a consequence of this change:

It does look like a bug to me as I would expect to get POINTERMOVE events only when mouse is moving over rendering canvas.

Thanks

Jacek

1 Like

Adding @PolygonalSun to fix it

I’ll take a look and see what’s going on

Fix is in PR: DeviceInputSystem: Check if pointer button is down before processing up outside of canvas by PolygonalSun · Pull Request #10254 · BabylonJS/Babylon.js (github.com)

1 Like

Thanks for very quick reaction to the bug report!
I see that the PR is merged, I’m not sure at what point changes are included in preview release but just letting you know that when I point my app to https://preview.babylonjs.com/babylon.js the bug is still present.