View.allowsHitTesting(false) incorrectly consumes touches on Android#354
View.allowsHitTesting(false) incorrectly consumes touches on Android#354tifroz wants to merge 4 commits intoskiptools:mainfrom
Conversation
|
Just so I understand completely, the correct behavior on iOS for, say, Could we get the correct behavior for Android by using something like |
|
The fix I am proposing with this patch is a very limited one - it is nowhere near providing a reasonable Android implementation of For context, Text Views (and other non-button views) are interactive on iOS by default, non-interactive on Android
Current implementation (Android behavior):
My understanding its that I have been working on a competing PR that provides a much more thorough implementation of |
|
Superseded by #359 |
.clickable(enabled: false, onClick: {})disables the view handlers for touch events but still consumes touches, breaking the iOS contract (whereallowsHitTesting(false)should allow touches to reach the lower layers)I changed
allowsHitTesting()to be a no-op on android, and added a unit-testtestAllowsHitTestingFalseOverlayPassesTapThroughthat 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
I think SkiFuseUI simply proxies the call to SkipUI's
allowsHitTesting()? If so this fix should apply to SkipFuseUI as wellSkip Pull Request Checklist:
swift test