Before I get into this bug report, I know there are members on the DevForum who have those comments pertaining to proper forum usage and whatnot, so I’d like to clear it up first:
- Yes I did use the search bar.
- No, none of the topics there have a solid solution I’d like.
- No, the bug still hasn’t been touched/fixed despite those many posts.
- No, I don’t want to necro posts from '14 or whenever they were posted.
Note: This is a bland Gui. There’s no fancy effects on it.
Using MouseEnter or MouseLeave on Gui buttons is completely fine and works as expected. When MouseButton1Click (or any other mouse down function) is incorporated, that’s where the bug begins. After clicking the button and firing any connected down events, the button reverts to its former state, effectively making it “unhovered”. When the mouse is moved even a pixel, it fires MouseEnter on the button. Now what I’d normally expect is that when I fire a mouse down event, the button can still be “hovered on” and won’t fire MouseEnter or let the button revert to its former state.
This bug happens every time. I’m pretty sure I explained how to reproduce the bug while describing what the problem was. I’m quite sure that most, if not all places, that do not have unique code, hacky methods or have implementations to solve this (however that is), experience this problem.
This bug happens on all versions of ROBLOX. It is not level or game specific.
I can’t record in Studio for whatever reason, I’m having a bit of difficulty with OBS right now and I don’t have any other screen recording program, so hopefully this GIF will suffice:
I haven’t a clue when it started happening. All I know is that I found threads made as far back as 2014. It’s been 7 years and it hasn’t been addressed. I found 12 topics in Bug Reports > Client Bugs related to MouseEnter/MouseLeave.
Here’s a “repro place”, if you desire to test it. It uses a bland text box and the three connections described in the first paragraph, not much else. Open it up and run it on play solo (F5).
“_ck” is for click, “_hv” is for hover, “_lv” is for leave. This helps indicate what the last event fired was.
Mouse over the button, take it off the button. Put the mouse back on the button, click, move your mouse slightly.
mouse bug repro place.rbxl (16.3 KB)