mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix android modal not disappear when reload (#27542)
Summary: Fixes https://github.com/facebook/react-native/issues/17986 See above issue After apply this change:  ## Changelog [Android] [Fixed] - Fix android modal not disappear when reload Pull Request resolved: https://github.com/facebook/react-native/pull/27542 Test Plan: Open a modal and do a refresh to see whether it disappears Differential Revision: D19178803 Pulled By: mdvacca fbshipit-source-id: 61894927fc481650804b2196df06a80c16b64e6c
This commit is contained in:
committed by
Facebook Github Bot
parent
5fc3b442ec
commit
5ddf00ee1a
@@ -96,6 +96,12 @@ public class ReactModalHostView extends ViewGroup implements LifecycleEventListe
|
||||
// Do nothing as we are laid out by UIManager
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addView(View child, int index) {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
|
||||
Reference in New Issue
Block a user