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

Remove scroll from body when modal is open #80

Merged
merged 2 commits into from
Sep 16, 2013
Merged

Conversation

abierbaum
Copy link
Contributor

Add .no-scroll to body on modal open
Remove .no-scroll from body on modal close

@ghost ghost assigned abierbaum Sep 12, 2013
@abierbaum
Copy link
Contributor

See: angular-ui/bootstrap#879

@abierbaum
Copy link
Contributor

See: angular-ui/bootstrap#798

This uses a bit of a hacky workaround to do this.  We set a value
on the $rootScope that the base template can then use to change
a class on the body.

In a future version of angular bootstrap they are supposed to add
back in a way to do this automatically as part of that tool.
$rootScope.modalIsUp = true;
$modal.open(opts).finally(function() {
$rootScope.modalIsUp = true;
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't one of these need to set the value to false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the one in the infally should set to false. Missed that one.

my8bird added a commit that referenced this pull request Sep 16, 2013
Remove scroll from body when modal is open
@my8bird my8bird merged commit 7105e91 into master Sep 16, 2013
@my8bird my8bird deleted the dev/add_no_scroll branch September 16, 2013 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants