Fix sending accessibility events to RN modals
Reviewed By: dmmiller Differential Revision: D3472359 fbshipit-source-id: c82d8e254cdd0531eb52805a6f00e63cf783fdc8
This commit is contained in:
parent
4ec53ee8fa
commit
fdcb865cf3
|
@ -21,6 +21,7 @@ import android.view.MotionEvent;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.R;
|
||||
|
@ -109,6 +110,13 @@ public class ReactModalHostView extends ViewGroup implements LifecycleEventListe
|
|||
// Those will be handled by the mHostView which lives in the dialog
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
|
||||
// Explicitly override this to prevent accessibility events being passed down to children
|
||||
// Those will be handled by the mHostView which lives in the dialog
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onDropInstance() {
|
||||
((ReactContext) getContext()).removeLifecycleEventListener(this);
|
||||
dismiss();
|
||||
|
|
Loading…
Reference in New Issue