Pointer over action vs lost focus

repro: Babylon.js Playground

Requirements: Have an application active other than your browser. For eg: file explorer

steps:
a) mouseover the sphere, it should turn red.
b) do not move your mouse, alt-tab to another application.
c) now move your mouse outside the boundaries of your browser window.
d) alt-tab back to your browser, the sphere remains red while the mouse is no longer over the sphere and outside browser window.

wai ? should the pout action take window.onblur or lost focus into account ? I think it should…

edit: should be pointer out action

Adding @PolygonalSun

You may use

document.addEventListener("visibilitychange", event => {
  if (document.visibilityState == "visible") {
    console.log("tab is active")
  } else {
    console.log("tab is inactive")
  }
})

Hey @phaselock,

Lemme take a look and see what’s going on.

1 Like

Just curious, I can still repro this. Is a fix incoming ? Or do I have to code a workaround ?