Skip to content

Commit

Permalink
Fix sending accessibility events to RN modals
Browse files Browse the repository at this point in the history
Reviewed By: dmmiller

Differential Revision: D3472359

fbshipit-source-id: c82d8e254cdd0531eb52805a6f00e63cf783fdc8
  • Loading branch information
cjhopman authored and Facebook Github Bot 8 committed Jun 22, 2016
1 parent 4ec53ee commit fdcb865
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
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;
Expand Down Expand Up @@ -109,6 +110,13 @@ public void addChildrenForAccessibility(ArrayList<View> outChildren) {
// 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();
Expand Down

0 comments on commit fdcb865

Please sign in to comment.