-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
Modals in 2.0 are broken on mobile. #3230
Comments
I've also experienced this issue (as I mentioned in the linked issue #1036 [thought it was still open when I commented]) in version 2.0.3 on an Android device. Haven't found a workaround yet, but am working on it... |
I found that changing the .modal { position:absolute; } css to position:fixed (in bootstrap-responsive.css) fixed the problem for me on Android 4, although I need to check it on more mobile browsers to be certain. |
Just tried @djbowen's code and got worse results. Any one know how to get modals to work on a mobile phone?!?! :) Thanks! |
@underparnv - well that's no good! :) what version of Android are you using? I've been fighting with mobile modals for a little while now ... provided I size the modal correctly and use position:fixed, it seems to be functioning OK in iOS 5 (iPhone & iPad) and Android 4.0.2 (Samsung Galaxy Nexus). |
Anyone having luck with a workaround for this issue? Thanks! |
This had been driving me nuts for over a month now. I finally figured out a fix tonight. In the bootstrap-responsive.css file, make the following changes:
BOOTSTRAP.CSS BOOTSTRAP-RESPONSIVE.CSS This fixed it for me. I'll be interested to see if anyone else has similarly positive results. |
After playing around a bit more, I've got a better version of the CSS down. Here's what I've done... In the responsive CSS file:
.modal { In the main CSS file:
.modal-body { |
Thanks @cferdinandi this fixed it for me as well. Cheers! |
Putting this into production today as it appears to have fixed the issue. Should maybe put it in a pull request though? Thanks @cferdinandi!!! |
David, Forgive me, but I'm a complete novice with GitHub. In fact, I signed up just to reply to this thread. How might I submit a pull request? Thanks, |
@cferdinandi This is your best bet: http://help.github.com/send-pull-requests/ Good luck! 👍 |
@fat - Any chance you could incorporate this fix into the next rev of Bootstrap? |
It works for me too, but I had to remove the '.fade' class from my modal window. |
there's also a problem with long words in h1 tags in mobile as well... |
Hugh, if you add line-height: 1; to the header tags, it fixes the issue. WIth the default settings, the line-height is too small and the words smush together. I added that to the regular CSS, but you can add it to the responsive only if you're so inclined. |
Cfernandi, thanks, but that didn't help. The words aren't smushing together, it's just one of the words is too long and overflows the right of the screen. I guess I'll just have to get a shorter surname :P |
Override the size of h1 elements in your own responsive CSS? |
Ahh, gotcha! I would second what @R1ch0 noted. I find that H1 and H2 tags are often too large on mobile screens (not just in Bootstrap, but many themes). |
Having a variant of this issue on Mobile and Tablet.
I tried implementing @cferdinandi 's fix and it helped a bit on tablet but doesn't full solve everything. Any further suggestions would be great. |
@cferdinandi solution works for now for my web app on iPhones. Thanks! |
I have the same issue but incorporated my own fix as of version v2.0.4: /* fix modal position for 480px devices */
@media (max-width: 480px)
{
.modal.fade.in {
top: 10px;
}
} place this after you include bootstrap.css |
Closing as dupe of #2130. |
When you use a button to present a modal on mobile, the screen turns black, and only does the modal appear after some crafty scrolling and zooming. This is not apparent to a new user.
Any fixes?
More discussion on the problem here: #1036
The text was updated successfully, but these errors were encountered: