In the pictures above, there is a green button under a dialog GUI. Everything in the dialog GUI has a higher Z-index than the green button. However, the green button’s mouse events are still fired when I move the mouse around in the dialog GUI. That includes MouseEnter, MouseLeave, MouseButton1Down, and MouseButton1Up (the one I’m especially concerned about).
Regular frames won’t block input from reaching a button if the Active property is false.
I set the dialog frame’s Active property to true and all the mouse events are still passing to buttons below.
Can you send me a repro?
Clicking in that area fires the green button’s MouseButton1Up event. I bound a print statement to it.
Maybe you can attach that part of the UI and a minimal script in a place file so that he can test it, then he doesn’t have to spend time constructing his own test case.
Well, I couldn’t get it to work on production but on my build where I’ve fixed a bunch of gui bugs the file you sent me does work out of the box.
https://i.gyazo.com/fb8de43d8d6b10d2a919281cd6da4e55.mp4
Coming soon TM
I want to resurface this thread since the bug hasn’t been fixed yet.
Can you send me a repro?
Two issues:
-
Although clicking a button doesn’t click those under it, all buttons under the mouse get highlighted when only the topmost should:
-
Regardless of active property of frame, if a frame is layered over a button, clicks pass through the frame
repro.rbxl (14.3 KB)
The bug still exists. Any updates?
This is still an issue today… I have a menu GUI which is layered on top of a full screen button. When you click anywhere on the menu GUI the all screen button layered beneath is invoked.
The point is to be able to click anywhere on the screen besides the menu GUI for the menu to be dismissed.
Any plans to fix this or do I just have to dump on layers conditionals
This is still an issue, but a way around preventing clicking through UI’s is placing an empty text or image button in the frame you don’t want people clicking through.
Still an issue. I have covered some UI elements with a slightly transparent Active=true TextButton, but the MouseEnter, MouseLeave, and MouseMove events still fire for those elements.
As you can see in this video, the items in the shop still get hovered over when I am trying to sell something. The sell menu should be blocking these items from having mouse events.
I would like to revive this topic because this bug is still present. It’s the same issue as OP, regardless of Z-Index or Active Gui Object properties.
Necrobump, this bug is still present more than four years later.
Bumping again, still not fixed 6 years later
This isn’t something we currently have planned to work on in the near future. It’s not a simple bugfix because it has significant backwards compatibility implications.
As things are now, the best workaround is to use an ImageButton/TextButton as a background for the dialog, which will sink the events.