Noticed that IPointerExitHandler.OnPointerExit are not fired when exiting a visual element while holding a mouse button down. The event is fired first when button is released and the pointer is outside the element.
Hover mouse cursor over a visualelement.
Hold any mouse button down and move it outside the element into game view. Notice that no exit event occurs.
Release button. Exit event is triggered.
Unity Editor 6000.0.25
I would expect that the event is triggered when the cursor leaves the the element even if a mouse button is held down like it works in UGUI.
Uh. That could have been an easy fix. Hmm. Do Does it happen in Builds too? UITK has a few quirks/bugs in the GameView related to events that can cross the barrier between EditorWindows.
Oh, Man. :/. Sorry I canāt be of more help. If you share a link to the issue tracker, Iāll vote for it, for whatever itās worth. Sometimes it takes a while, though. I have a ListView bug thatās been in the issue tracker for three months āUnder Considerationā, and a SerializeReference one thatās been there since May, with some pretty thorough reproduction examples.
Otherwise, maybe in the mean time, you could do a workaround by using MouseMove to track the mouse position?