Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fancybox does not scroll in Google Chrome

http://www.mayakaimal.com/media-press

It works in all other browsers I have tested.

<script type="text/javascript">
        $j = jQuery.noConflict();
        $j(function(){
        $j("a.fancybox").fancybox({
            maxWidth    : '100%',
            maxHeight   : '100%',
            fitToView   : false,                   
            closeClick  : false,
            openEffect  : 'none',
            closeEffect : 'none'
        });   
        });
    </script>
like image 821
bbosco Avatar asked Aug 10 '26 01:08

bbosco


1 Answers

If the specified fancybox height is more than a certain value, the fancybox will not scroll. Not sure why that is the case.

The below code worked in my case. Play with it to see if it can fix your case.

    height: Math.min(600, $(window).height() - 96)

    $.fancybox({
        width: 800,
        height: Math.min(600, $(window).height() - 96),
        autoScale: false,
        padding: 8,
        href: url,
        scrolling: 'auto',
        hideOnOverlayClick: false,
        centerOnScroll: true,
        transitionIn: 'elastic',
        transitionOut: 'elastic',
        type: 'iframe'
    });
like image 143
RB79 Avatar answered Aug 13 '26 07:08

RB79