-
Notifications
You must be signed in to change notification settings - Fork 211
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
Body jumps when activating a modal in iOS #32
Comments
Thanks for reporting. This is related to #31 and I will try to find a working solution. |
This also applies for Android Chrome and Opera 14. |
As all related issues are closed, what's the status here? |
Same here. Just posting to bump this thread and check the status of this. Apparently it also happens in the Chrome iOS app. iOS 6.1.2 |
There is a workaround for this,.. Sorta. Make the anchor href link for "Close" button to href="#page" and then set the body's id to "page". The close button will serve as an anchor link to redirect users to the top of the page. This pattern is seen in lukew.com, with his navigation serving as bottom anchor links that also has a link redirecting to the top. However it does not address the main issue of modal triggering page jump, so the issue should still remain open. |
Does anyone have a way to prevent this mkkwon's solution works for closing the modal but what about opening it? |
Has anyone discovered a workaround for this issue that they can share here? The page jump for iOS is creating other issues that are causing breakages in the style, especially on changing orientation from portrait to landscape. Help would be greatly appreciated. |
Have you guys checked out branch wip-1.1.0 yet? This issue should be fixed already in the upcoming release. You can use this branch's code already although not all tasks for 1.1 have been finished. |
Just tried the new modal.css and modal.js files for this branch. Still seeing this issue. |
No problem. Just let me know if/when there is a fix. I'll try to hack something in the intermediary |
It would be great if you could write down your working hack here then, so others can profit from it, too. :) |
Here's what I did to prevent this from happening on my end. It's not ideal, but the page jump doesn't happen. I think the key is the fact that position:fixed is used for the modal. If the user loads the page with the modal hash, remove it so the page doesn't jump.
Also change the position of the semantic content div, modal inner, and modal close to absolute for mobile devices
This gets rid of the nice slide up animation of the modal for mobile, but it was a price I had to pay to prevent the page jump. |
Every time you activate a modal, the page jumps down.
iOS 6.1.4
The text was updated successfully, but these errors were encountered: