Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="https://github.com/twitter/bootstrap/issues/2130#issuecomment-7664836" rel="nofollow">The solution by niftylettuce</a> in <a href="https://github.com/twitter/bootstrap/issues/2130" rel="nofollow">issue 2130</a> seems to fix modals in all mobile platforms...</p> <p><em>9/1/12 UPDATE</em>: The fix has been updated here: <a href="https://github.com/niftylettuce/twitter-bootstrap-jquery-plugins/tree/master/modal-responsive-fix" rel="nofollow">twitter bootstrap jquery plugins</a></p> <p>(the code below is older but still works)</p> <pre><code>// # Twitter Bootstrap modal responsive fix by @niftylettuce // * resolves #407, #1017, #1339, #2130, #3361, #3362, #4283 // &lt;https://github.com/twitter/bootstrap/issues/2130&gt; // * built-in support for fullscreen Bootstrap Image Gallery // &lt;https://github.com/blueimp/Bootstrap-Image-Gallery&gt; // **NOTE:** If you are using .modal-fullscreen, you will need // to add the following CSS to `bootstrap-image-gallery.css`: // // @media (max-width: 480px) { // .modal-fullscreen { // left: 0 !important; // right: 0 !important; // margin-top: 0 !important; // margin-left: 0 !important; // } // } // var adjustModal = function($modal) { var top; if ($(window).width() &lt;= 480) { if ($modal.hasClass('modal-fullscreen')) { if ($modal.height() &gt;= $(window).height()) { top = $(window).scrollTop(); } else { top = $(window).scrollTop() + ($(window).height() - $modal.height()) / 2; } } else if ($modal.height() &gt;= $(window).height() - 10) { top = $(window).scrollTop() + 10; } else { top = $(window).scrollTop() + ($(window).height() - $modal.height()) / 2; } } else { top = '50%'; if ($modal.hasClass('modal-fullscreen')) { $modal.stop().animate({ marginTop : -($modal.outerHeight() / 2) , marginLeft : -($modal.outerWidth() / 2) , top : top }, "fast"); return; } } $modal.stop().animate({ 'top': top }, "fast"); }; var show = function() { var $modal = $(this); adjustModal($modal); }; var checkShow = function() { $('.modal').each(function() { var $modal = $(this); if ($modal.css('display') !== 'block') return; adjustModal($modal); }); }; var modalWindowResize = function() { $('.modal').not('.modal-gallery').on('show', show); $('.modal-gallery').on('displayed', show); checkShow(); }; $(modalWindowResize); $(window).resize(modalWindowResize); $(window).scroll(checkShow); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload