UI MouseLeave event is broken

When you unclick the mouse, (frames specifically in my case), it fires “MouseLeave” for all UI elements it is currently over even though the mouse is still over the elements.

This happens every time.

I know because Phantom Forces is now broken.

1 Like

This should be fixed as of about 20 minutes ago.

2 Likes

Oh good thanks. Took me time to log in and write it up. Still broken on my studio. Guess I have to restart.

Does anybody know why this has happened twice? Is this the direction UI is going to be taking in the future?

1 Like

Remember the human.

When you’re working on a code base as large as Roblox’s code base, issues are bound to come up.
A large refactor is being done to the UI system behind the scenes, and some bits and pieces are bound to come up periodically.

3 Likes

Thanks. It was a legitimate question. I didn’t know if it was a bug or not.

We’re currently working on a rewrite of the system that handles MouseEnter/MouseLeave to make them actually fire reliably. We tried to turn it on yesterday, but it had issues that made us turn it off.

We have a suite of UI system unit tests, but it doesn’t cover user input yet, so this change was relying on manual testing for verification.

6 Likes

Will these changes allow for the mouse events fire even when the mouse is not moving? Example: you enter a button and the button shrinks while your mouse remains still. Does this trigger the MouseLeave event?

Right now, I am having to use a workaround that my friend gave me to handle UI animations that are from mouse interactions with instances.

1 Like

Not currently, but we could change it to make that possible. That would mean that we perform user input checks every frame regardless of if you’re actually moving the mouse.

4 Likes