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

Does not scroll with page #8

Open
Finetuned opened this issue Jan 12, 2012 · 4 comments
Open

Does not scroll with page #8

Finetuned opened this issue Jan 12, 2012 · 4 comments

Comments

@Finetuned
Copy link

When the viewport is smaller than the modal popup, you cannot scroll it to see the additional content or close box.
FIX: change style: position from fixed to absolute

@eipark
Copy link

eipark commented Jan 26, 2012

This raises another issue though. If you have a long page that goes longer than the fold of a site, and you click a link at the bottom, the box may show up above the fold and out of your current viewport. I believe a solution may be to initially fix the position of the box to x pixels from the top. Then, get the position of the window and change its position to absolute so you can scroll. I may try to code this and do a pull request.

@Tizianol8
Copy link

True.. You can use something like..
o.top = $(document).scrollTop() + 100;
and postion absolute..

@isaachinman
Copy link

eipark raises a good point. While changing position from fixed to absolute fixes the scrolling problem, it raises the problem of modals popping up well above the fold. Anyone have any possible solutions here?

@isaachinman
Copy link

Well, here's the workaround I eventually settled on:

Leave position: fixed, and add these lines to the js:

"max-height": 80 + "%",
"overflow": "auto",

This will ensure that the modal is always in current viewport, is never larger than current viewport, and will scroll if content exceeds current height.

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

4 participants