Skip to content

Commit

Permalink
Fix android modal not disappear when reload (facebook#27542)
Browse files Browse the repository at this point in the history
Summary:
Fixes facebook#17986

See above issue

After apply this change:
![ezgif-4-45d9add85b74](https://user-images.githubusercontent.com/615282/70987576-2520ad00-20fb-11ea-9b90-c9a7839824a5.gif)

## Changelog

[Android] [Fixed] - Fix android modal not disappear when reload
Pull Request resolved: facebook#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
  • Loading branch information
sunnylqm authored and KusStar committed May 23, 2021
1 parent 2299da8 commit a697308
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
// Do nothing as we are laid out by UIManager
}

@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
dismiss();
}

@Override
public void addView(View child, int index) {
mHostView.addView(child, index);
Expand Down

0 comments on commit a697308

Please sign in to comment.