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?


@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:

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).


And on a related note, if I call 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!

any news on this one? i am getting the onGame: true, even when there is no runnning game.