Skip to content

Commit

Permalink
Fix android modal not disappear when reload (#27542)
Browse files Browse the repository at this point in the history
Summary:
Fixes #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: #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 facebook-github-bot committed Dec 19, 2019
1 parent 5fc3b44 commit 5ddf00e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,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) {
UiThreadUtil.assertOnUiThread();
Expand Down

0 comments on commit 5ddf00e

Please sign in to comment.