Alert popup makes cursor go haywire


I am showing popup on click of some element in my screen. The popup appears fine but when we move the cursor to close the alert box, it goes haywire changing / rotating the scene in different directions.

PG is here:

Please help.

It looks like there is a ponterDown event but the pointerUp is not detected. Ping @PolygonalSun

Lemme take a look and see what’s going on

@Cedric I think that you’re absolutely right. Specifically, I think that it’s related to the pointer losing focus. I’ll dig in and figure out what needs to be fixed.

1 Like

Nothing going haywire on my side at this time. Using chrome/mac, the PG above works for me. Either change is already done or depending on config/browser.

@Cedric Thanks for pointing me towards that direction. I tried changing pointerDown event to pointerUp in my local environment and it worked fine. :relaxed:

Not sure how that worked on Mac. It’s still rotating the scene in PG. M using W10 with chrome.
But as Cedric said it’s about capturing right event. I haven’t changed the PG yet. Let me try with it.

Give a min. I’ll switch to your config and try…

Edit: Yes you’re right. Just tried win10+chrome, and can see your problem. Browser/config side related I can suppose. Likely related to the overall topic of ‘don’t get the mouse/pointer up event from the browser’ kind of stuff, I again suppose…

Edit2: Just tried to change #L31 of your PG to call the alert on pointer up
case BABYLON.PointerEventTypes.POINTERUP:

Nothing to report in chrome win10 or mac or else (edge, safari). It seems to work fine…

1 Like