[ReactNative] Disable accessibility of RootView when dialog appears. Apply it for AdsManager.
This commit is contained in:
parent
1ca1a44a07
commit
ed9b8c8b3b
|
@ -90,6 +90,11 @@ var Portal = React.createClass({
|
|||
},
|
||||
|
||||
_showModal: function(tag: string, component: any) {
|
||||
// We are about to open first modal, so Portal will appear.
|
||||
// Let's disable accessibility for background view on Android.
|
||||
if (this._getOpenModals().length === 0) {
|
||||
this.props.onModalVisibilityChanged(true);
|
||||
}
|
||||
// This way state is chained through multiple calls to
|
||||
// _showModal, _closeModal correctly.
|
||||
this.setState((state) => {
|
||||
|
@ -103,6 +108,11 @@ var Portal = React.createClass({
|
|||
if (!this.state.modals.hasOwnProperty(tag)) {
|
||||
return;
|
||||
}
|
||||
// We are about to close last modal, so Portal will disappear.
|
||||
// Let's enable accessibility for application view on Android.
|
||||
if (this._getOpenModals().length === 1) {
|
||||
this.props.onModalVisibilityChanged(false);
|
||||
}
|
||||
// This way state is chained through multiple calls to
|
||||
// _showModal, _closeModal correctly.
|
||||
this.setState((state) => {
|
||||
|
|
Loading…
Reference in New Issue