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

Scrolling in Modal makes background scroll on Safari #7501

Closed
kristianbendren opened this issue Apr 7, 2013 · 5 comments
Closed

Scrolling in Modal makes background scroll on Safari #7501

kristianbendren opened this issue Apr 7, 2013 · 5 comments

Comments

@kristianbendren
Copy link

Hi everyone,

I need to have some help with an annoying thing.
I have an modal popup which has vertical scrollsbar inside. When scrolling inside the modal sometimes the background scrolls instead.
I have tried to add

body .modal-open {
position:relative;
overflow: hidden;
}

which works fine on most of the browsers, but Safari for my iPhone still scrolls!

Please help me find how to solve this!

Regards Kristian

@cvrebert
Copy link
Collaborator

cvrebert commented Apr 7, 2013

Duplicate of #3361?

v3.0 is slated to fix this. Until then, maybe try http://jschr.github.io/bootstrap-modal/ ?

@mdo
Copy link
Member

mdo commented Apr 7, 2013

What @cvrebert said.

@mdo mdo closed this as completed Apr 7, 2013
@kristianbendren
Copy link
Author

Hi again,

thanks for your reply. I have tried the page but the problem is the same there.
When is the v.3.0 supposed to be released?

Many thanks!

@alexanderstocker
Copy link

$('body').css('overflow','hidden');
$('body').css('position','fixed');
Did it for me.

@ghost
Copy link

ghost commented Jul 2, 2014

Thanks to @alexanderstocker for his response. The overflow hidden part wasn't working by itself, but the position: fixed did the trick for me!

@twbs twbs locked and limited conversation to collaborators Jul 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants