The bug: when a TextButton or ImageButton is placed inside a ScreenGui, and the ScreenGui’s Enabled is set to False, the button still forces modal behavior.
This is in contrast to setting Visible to a gui object above the button in Hierarchy, which disables the modal behavior.
Repro:
- Create a ScreenGui, a Frame in the ScreenGui, and a TextButton in the Frame. Set the TextButton Modal to True.
- Play the game and zoom in. The modal behavior prevents the mouse from being locked in the center
- Set the Visible property of the Frame to False. The modal behavior stops. Set the Visible property of the Frame to True. The modal behavior starts.
- Set the Enabled property of the ScreenGui to False. The modal behavior continues.
Expected: modal behavior stops when ScreenGui’s Enabled is set False.