javascript - iPad, iPhone modal dialog scrolling issue -


various pages on our website open jquery 'modal dialog' boxes.

these work fine in every web browser.

however problem occurs when viewing on ipad or iphone, , believe common issue.

on pages modal dialog box big ipad screen, therefore need scroll modal box.

however when dialog box doesnt move, background (i.e. main screen behind it) scrolls.

i want disable background scrolling when modal open enable modal dialog scroll.

i have tried 'position:fixed' underneath 'overflow:hidden' has solved issue others, unfortunately me, issue still exists.

does have other ideas/things can try?

below example of code 1 of pages opens in modal dialog box.

thanks

<script>     function myonload() {         window.parent.$('body').css('overflow', 'hidden');      }     </script>    <body onload="myonload()">     <div class="wrapper">     <div id="popup" class="modaldialog2">    <!--dialog content here-->   </div> </div>   <script type="text/javascript">     // close modal     $("#close").click(function (e) {     e.preventdefault();     window.parent.$('body').css('overflow', 'auto');     window.parent.$("iframe").attr('src');     window.parent.$(".modaldialog").removeclass('show');     }); </script> 

i had issue, lines of code below resolved me -

html{      overflow: scroll;      -webkit-overflow-scrolling: touch; } 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -