Skip to content

tkafka/swiftui-bug-cant-scroll-scrollview-through-disabled-overlay

Repository files navigation

Expected behavior

Element with .allowsHitTesting(false).disabled(true) should not swallow any user interactions.

Actual behavior

Clicks at buttons might happen through the element, but all gestures are swallowed - user cannot scroll the underlying ScrollViews if the origin of touch begins in a red overlay rectangle.

Where it happens

Everywhere I tried - iOS, WatchOS ...

Video:

Image of problem

Workaround

See branch hacky-workaround-01 with a hack from https://stackoverflow.com/a/68448681/38729.

It works, but I have no idea about performance implications, and (main problem for me!) it isn't applicable in WatchOS.

Other cases where people encountered this

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages