Today's Fun Glitch

I discovered today that if you click on the 1px outside of a TextField border, the TextField becomes transparent – even in light mode. In dark mode all controls are transparent, but in light mode that’s not the case.

This weird behavior caused a visual display glitch with a project I’m working on.

The TextFields are Transparent: False. The text is drawn in Window.Paint. Resizing the window after the glitch happens fixes the visual.

See the video, the demo project, and enjoy!
Happy coding, everyone :slight_smile:

Project: https://tim.gdn/xiHSV
Video: https://tim.gdn/xiHSV/test.mp4

4 Likes

I’m happy to give a Xojo bug report a thumbs up if you have one…

I’m sorry to break it to you @Tim_Parnell, but that’s a bug in macOS (if it is a bug at all). I am able to reproduce that in Xcode.

1 Like

What happens if you then click in the TextField?

@Patrick_Salo it’s a system level glitch that affects non-Xojo apps too.

@Greg_O thanks for looking into it! I had tested with non-Xojo apps and found it there too, corroborating what you found by building a test project in Xcode.

@TimStreater The text is still visible with a click inside. The demo project lets you play with the glitch, the hardest part is only clicking in the right spot.

Just to be clear, I’m not complaining about this and I have a workaround for my project! I just wanted to share it because in 20+ years of using Mac OS, I hadn’t ever seen this before.

3 Likes

The bug “works” too with a control behind, albeit it’s not actionable. I checked with a checkbox, which indeed appeared, but wasn’t clickable (and even looked disabled :man_shrugging:).

1 Like