No "mouseleave" event fired if the mouse goes from the element to outside the game window

I have an overlay that is positioned at the top right of the game screen.
When the user mouses over an element in this overlay, a tooltip is displayed after a short while, and the display is canceled if the mouse leaves the element.
This works well if the mouse leaves the element and stays in game. However, if it directly goes outside the game window (which is possible because the overlay is positioned at the top right), no event is fired.

Is there a way to cleanly know if the mouse leaves the game window altogether?

Thanks!

@sebastientromp just to clarify: the element with the tooltip sits in an in-game window? and you game is in windowed mode?

Yes to both :slight_smile:

@sebastientromp can you please send me the OPK and the exact steps to reproduce?

@eransharv Download and install the OPK from here: https://github.com/Zero-to-Heroes/firestone/releases/download/3.4.5/Firestone.3.4.5.opk

Then launch Hearthstone, and make sure that it’s running in Windowed mode. Then go to Solo Adventures, then Practice, and play a game against the AI.
A decktracker (the list of all the cards in your deck) should appear at the top right of the screen.
Pass your mouse from the game board to the decklist and exit the game window to the side. A tooltip should appear.

See the attached gif - as the mouse leaves the decktracker, the tooltip display should be cancelled (which is what happens if I move the mouse outside the tracker into the game screen, but not outside of the game window into the second screen).

Thanks!

And on a related note, if I call overwolf.games.inputTracking.getMousePosition() just before showing the tooltip, it returns "onGame": true,, while the mouse is on the second screen and outside of the game at this point.

Hey, I found a workaround so fixing this is not necessary for me anymore.

Thanks :slight_smile:

@sebastientromp thanks for the update!