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

Fixes issue where when using Bootstrap Modals, multiple ng-pageslide… #149

Conversation

genaro-picazo
Copy link

…-body-[open|closed] classes are added to the body.

…body-[open|closed] classes are added to the body.
@genaro-picazo
Copy link
Author

@dpiccone - Can you please check out this pull request? The issue it solves is that when using the ng-pageslide directive in an application that also uses the bootstrap modals (ui-bootstrap), multiple ng-pageslide-body-[closed|open] tags are added to the body as soon as a modal is opened.

Assuming the pageslide panel was closed when the modal was launched, the body class looked like: " ng-pageslide-body-closed" before opening it, after opening it, it looks like: "ng-pageslide-body-open ng-pageslide-body-closed" and after closing the modal, it looks like: "ng-pageslide-body-closed ng-pageslide-body-closed". Note that the first ng-pageslide-body-* class name does not have a space character before it. Thus, toggling the pageslide panel afterwards does not affect the first class name, only the second one. That means that the overlay (using the CSS :before selector) no longer works since when the panel is opened, you now have a *-open and a *-closed class on the body. Easily reproducible on multiple applications that I tried.

@danielepiccone danielepiccone merged commit 5261ec1 into danielepiccone:master Dec 3, 2016
@danielepiccone
Copy link
Owner

Thanks for this, I added another fix to prevent adding unnecessary spaces to body.className 👍

danielepiccone added a commit that referenced this pull request Dec 3, 2016
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

Successfully merging this pull request may close these issues.

2 participants