Skip to content

Bug fix: On Android allowsHitTesting(false) consumes touches#353

Open
tifroz wants to merge 3 commits intoskiptools:mainfrom
tifroz:main
Open

Bug fix: On Android allowsHitTesting(false) consumes touches#353
tifroz wants to merge 3 commits intoskiptools:mainfrom
tifroz:main

Conversation

@tifroz
Copy link

@tifroz tifroz commented Mar 16, 2026

.clickable(enabled: false, onClick: {}) disables the view handlers for touch events but still consumes touches, breaking the iOS contract (where allowsHitTesting(false) should allow touches to reach the lower layers)

I changed allowsHitTesting() to be a no-op on android, and added a unit-test testAllowsHitTestingFalseOverlayPassesTapThrough that must run on a real device/simulator. A no-op is not perfect, but better than doing the opposite it should be doing.

I verified that the new test

  • Fails with the current implementation
  • Succeeds with the proposed change

I think SkiFuseUI simply proxies the call to SkipUI's allowsHitTesting()? If so this fix should apply to SkipFuseUI as well

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
  • OPTIONAL: I have added an example of any UI changes in the Showcase sample app

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

@cla-bot cla-bot bot added the cla-signed label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant