Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModalDirective: Background of modal dialog is not hiding after navigation to another page #1051

Closed
aperevalov opened this issue Sep 28, 2016 · 2 comments
Assignees

Comments

@aperevalov
Copy link

Trying to use modal directive and found an issue. Background is not hiding when you navigate to another page.
Reproducible on official demo site:

  1. Navigate to http://valor-software.com/ng2-bootstrap/#/
  2. Click on Modals menu
  3. Click on "Large Example" button, Dialog should appear.
  4. Click "Back" button in your browser
  5. Observe the whole page hidden behind semi transparent dialog's background.

Also reproducible if I put routerLink in the body of my dialog to navigate to another component, so it's not linked directly to browser navigation through native buttons.

I also tried to implement OnDestroy in my component and call there dialog's hide() method, but looks like OnDestroy is not called at all in steps above, maybe I understood meaning of OnDestroy wrong.

I'll try to find a solution, but maybe someone already know a workaround.

aperevalov pushed a commit to aperevalov/ng2-bootstrap that referenced this issue Sep 29, 2016
@valorkin
Copy link
Member

valorkin commented Oct 3, 2016

This is nice catch, thank you!

@tbadlov
Copy link

tbadlov commented Feb 19, 2019

This is actually not fixed.

Check your documentation page, open a modal window and then navigate back and forth.
The modal is still open. I wasn't able to solve this by using the bsModalRef.hide()method.

Any workaround known workarounds this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants