Edge Case: Mouse Events (MouseEnter, MouseLeave, MouseButton1Click) no longer fire on buttons inside SurfaceGui's

Describe the bug. Describe what is happening when the bug occurs. Describe what you would normally expect to occur.

When wrapped inside a SurfaceGui, and within the context of my game, TextButtons wouldn’t fire MouseEvents, let it be MouseEnter, MouseLeave and MouseButton1Click. I have confirmed that this is a bug because:

  • I didn’t perform any changes to the scripts that connect functions to those events;
  • The issue fixes itself when I set the AlwaysOnTop property as true

How often does the bug happen (Everytime/sometimes/rarely)? What are the steps that reproduce the bug? Please list them in very high detail.

In this case, it happens everytime AlwaysOnTop is disabled.

Where does the bug happen (www, gametest, etc) Is it level-specific? Is it game specific? Please post a link to the place that exhibits the issue.

As an edge case (I assume it since I was unable to create a reproduction file), it happens here.

Would a screenshot or video help describe it to someone? If so, post one.

AlwaysOnTop is disabled.
https://gyazo.com/6cb92e740ebd1987b16cefdac60dbbe5.mp4

AlwaysOnTop is enabled.
https://gyazo.com/d010d6c8a3ca4343ceceb7c326288e7f.mp4

Aestethically-wise, AlwaysOnTop isn’t appealing here.

When did the bug start happening? If we can tie it to a specific release that helps us figure out what we broke.

This bug began happening since the last update, if I recall correctly.

9 Likes

Update: After some investigating, I have ruled out some possible cases.

  • There aren’t Active ScreenGui components in the screen that block the click.
  • There aren’t really any bricks blocking the mouse path:

all bricks with Transparency set to 0
https://gyazo.com/871bfb2e3643c7bab8b1244a63c9f62a.mp4

  • The gui’s are under folders but that doesn’t seem to be the cause of the problem (the attempted reproduction had those, and the edge case did not happen);

  • The fact that the camera is attached to a block doesn’t cause the bug either.

I indeed have no idea what is the cause of the bug.

2 Likes