Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glur can affect hittesting between independent views #11

Open
ANGOmarcello opened this issue Mar 19, 2024 · 1 comment
Open

Glur can affect hittesting between independent views #11

ANGOmarcello opened this issue Mar 19, 2024 · 1 comment

Comments

@ANGOmarcello
Copy link

Hey there,

Glur is really amazing and I like using it a lot. That being said I had some issues with buttons not working if they are added on top of a view which uses Glur. It took me a while to realise why. The Glur shader view does not necessarily have the exact size of the view it is applied to, it can in fact be much wider than what the user sees for example. So multiple views with Glur in a Slider or a GridRow can prevent interaction with Buttons on top of views, while not preventing simple .onTapGesture calls on views with Glur.

If you set .allowsHitTesting(false) after applying the Glur view modifier this source of issues can be eliminated.

I'm wondering if this should be part of Glur by default, as it just seems to be a quirk of the shader view used internally and would remove a possible source of confusing issues. What do you think?

Cheers,
Angelo

@ANGOmarcello
Copy link
Author

One example of an affected layout:
Screenshot_19:02:26_19-03-2024

Without .allowsHitTesting(false), the bookmark button will only work on the last tile in the slider, since each shader view covers the button tap area of the preceding tile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant