Closed levinqdl closed 8 years ago
I have this problem too. In emulator thats work and in android 4.4.2 that is depend on indent components.
@zerob4wl please see my update
@zerob4wl A workaround is to turn off all accessibility services, then the Modal will work properly.
@levinqdl I don't undrestand how to fix this error. when I just use <Modal><Text>hi</Text></Modal>
, I get this error.
@zerob4wl the error happens when the phone enables any accessibility service, so turn off the services in settings. But this is just a workaround, I currently don't know how to solve it, too. I will look into it soon.
@facebook-github-bot label android
We have the same problem. Did someone find how to fix it?
@rasom I use "react-native-root-modal", but it is so slow in rendering complex components.
cc @dmmiller I think you had fixed this?
Closing this since it has been fixed.
the Modal component throws an exception when the modal is opening with any accessibilty service is ON (like TalkBack) I have found the cause of the issue, and paste some related code. But I haven't known how to solve the problem. Any helps will be great.
the stack trace:
related code: android.view.View:
When no accessibility service is on, the method notifySubtreeAccessibilityStateChangedIfNeeded return immediately, but, when any accessibility is on, the method will do more things. The program will run into offsetRectBetweenParentAndChild method in ViewGroup, which throws the exception. android.view.ViewGroup:
In the method, it walks through the view hierarchy from the descendant with the while loop, until it reaches the GroupView instance. But when it comes the Modal component, the loop quit with theParent is an instance of ViewRootImpl, and the condition as last of the method fails, so the method throws the exception.