zurb / reveal

677 stars 173 forks source link

Modal background doesn't work right on iPad #8

Open amps211 opened 13 years ago

amps211 commented 13 years ago

On iPad, the modal background does not necessarily cover the whole viewport. The fix is to set the modal background height to match the body height when the modal is opened (or when the modal background element is created).

modal.bind('reveal:open', function() {
    modalBG.css('height', $('body').height());
    ...
mkelly12 commented 13 years ago

Thanks for the workaround. We're actually currently working on making reveal work much better on mobile devices. I'll keep this issue open until we finish.

rjyo commented 12 years ago

Here's a hack that worked for me.

changed

modalBg = $('<div class="reveal-modal-bg" />').insertAfter(modal);

to

modalBg = $('<div class="reveal-modal-bg" />').insertAfter(modal.parent());