-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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 onAccessibilityAction on Fabric #35507
Conversation
ReactAccessibilityDelegate performAccessibilityAction dispatches the event topAccessibilityAction -- Understand why Fabric does not call registerEventEmitter before performAccessibilityAction for that reactTag/surfaceId Read StackTrace from error message (use printStacktrace) The method getUIManager retrieve the UIManager from the reactTag and does not check if is Fabric or Paper ReactAccessibilityDelegate [performAccessibilityAction](https://github.com/facebook/react-native/blob/bf37a34c38b39a14de8194520d07de0b9f8c0bf7/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java#L410-L415) dispatches the event topAccessibilityAction Understand why Fabric does not call [registerEventEmitter](https://github.com/fabriziobertoglio1987/react-native/blob/163171ccab6937785f4f3c85e011bd14540bebf5/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java#L426) before performAccessibilityAction for that reactTag/surfaceId Read StackTrace from [error message](facebook#30841 (comment)) (use [printStacktrace](https://www.google.com/search?q=java+printStacktrace)) The method [getUIManager](https://github.com/fabriziobertoglio1987/react-native/blob/dc4c54ec1b7b7f7cd37c7402b1eac5292cb4996a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.java#L40-L48) retrieve the UIManager from the reactTag and does not check if is Fabric or Paper
CLICK TO OPEN TESTS RESULTS
2022-11-29.17-02-00.mp4 |
Base commit: dccb57f |
Base commit: dccb57f |
PR build artifact for 69d43f8 is ready. |
PR build artifact for 69d43f8 is ready. |
@philIip has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: fixes facebook#30841 (comment). onAccessibilityAction does not work on Fabric and logs: ``` E/unknown:ReactEventEmitter( 3845): com.facebook.react.bridge.ReactNoCrashSoftException: Cannot find EventEmitter for receiveEvent: SurfaceId[1] ReactTag[104] UIManagerType[2] ``` ## Changelog [Android] [Fixed] - Fix onAccessibilityAction on Fabric Pull Request resolved: facebook#35507 Test Plan: facebook#35507 (comment) Reviewed By: javache Differential Revision: D41707777 Pulled By: philIip fbshipit-source-id: 0f4550a17f4b8bfc1aefa404059b367907f8f60d
Summary
fixes #30841 (comment). onAccessibilityAction does not work on Fabric and logs:
Changelog
[Android] [Fixed] - Fix onAccessibilityAction on Fabric
Test Plan
#35507 (comment)