Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fancybox overlay issue on ipad/iphone

On ipad / iphone, the overlay appears over the top of media in fancybox, that is the whole page is filled with the overlay incuding the content of fancybox. Any ideas how I can fix this?

Also, I have jwplayer working in fancybox playing videos using html5, instead of Flash, but the problem is the overlay appearing on top of the video, so that when I touch the play button, fancybox goes away...

See my previous question on my implementation of jwplayer in fancybox for ios at jwplayer in fancybox not playing on ipad/iphone

EDIT:

Interestingly, if I comment out this block of css, I can click on the fancybox video on an ipad without it going away and play the video:

.fancybox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    display: none;
    z-index: 9999;
background: url('fancybox_overlay.png');
}

Whilst fancybox then works OK on iPhone and iPad, the display of fancybox of desktop devices is less than desirable...

like image 255
IlludiumPu36 Avatar asked Feb 14 '13 04:02

IlludiumPu36


2 Answers

It may me due to z-index issue. Try adding these lines at last of the CSS file :

.fancybox-overlay{z-index:9999 !important}
.fancybox-wrap{z-index:99999 !important}
like image 123
Mandeep Pasbola Avatar answered Oct 02 '22 16:10

Mandeep Pasbola


If I change the css in jquery.fancybox.css to the following, all is fine on desktop and ios devices:

.fancybox-overlay {
    position: relative;
    top: 0;
    left: 0;
    overflow: hidden;
    display: none;
/*    z-index: 9999;*/
background: url('fancybox_overlay.png');
}
like image 45
IlludiumPu36 Avatar answered Oct 02 '22 16:10

IlludiumPu36