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
fix(android): ListView tap not working after setting children as focusable #10522
fix(android): ListView tap not working after setting children as focusable #10522
Conversation
@CatchABus only issue I see is that it is not synced with isUserInteractionEnabled.if accessibility is disabled then focusable seems to not be linked to isUserInteractionEnabled
|
We still have the following scenario. We have this view: <stacklayout></stacklayout> Even though this.isUserInteractionEnabled && this.nativeViewProtected.isFocusable() So if we keep [accessibilityEnabledProperty.setNative](value) {
// ensure `accessibilityEnabled=false` does not disable focus for view with `isUserInteractionEnabled=true`
this.nativeViewProtected.setFocusable(!!value || this.isUserInteractionEnabled && this.nativeViewProtected.isFocusable());
if (value) {
updateAccessibilityProperties(this);
}
} What do you think? |
@CatchABus You are right. Feels like a lot of things need to be fixed there. |
6e10d9b
to
87a5a92
Compare
PR Checklist
What is the current behavior?
We had reports that android ListView
itemTap
event stopped working at core 8.7 and later.The problem seemed to be that ListView proxy views became focusable due to some a11y calls, thus breaking native item click listener. A thread in StackOverflow explains why ListView does not operate well if list items become focusable: https://stackoverflow.com/questions/11610023/click-is-not-working-on-the-listitem-listview-android
What is the new behavior?
Views will become focusable or non-focusable only when needed.
This is a continuation of the previous fix related to WebView accessibility focus: 92b2ff8
@farfromrefug Let me know if there's room for any improvements.