I have a hidden div element which appears when a button is clicked.
https://handybin.com.au/ (Book Online)
I set the div width and height in css:
.booking-inner-popup {
width: 80%;
height: 90vh;
background-color: #fff;
position: relative;
top: 0;
bottom: 0;
right: 0;
left: 0;
margin: 40px auto;
border-radius: 0;
}
I use jQuery to set the width and height relative to the browser viewport using:
jQuery(document).ready(function(){
var windowHeight = jQuery(window).height();
jQuery('#BookingFrame').css('height', windowHeight * 0.9 | 0);
jQuery( window ).resize(function() {
var windowHeight = jQuery(window).height();
jQuery('#BookingFrame').css('height', windowHeight * 0.9 | 0);
});
});
This works fine in browser and on Android (In that it provides scrollbars for content out of view) BUT it does not work on Apple devices (no scrollbars).
When viewing on an iPad - the height extends well past the bottom of the screen which cuts off the bottom of the form, including the submit button and restricts anyone from using the form.
I have googled and tried a few solutions but none of them work. Any ideas?
UPDATE
I applied the settings as outlined in links provide to working versions:
- Changed the jQuery to resize the wrapper-div
- Added scrolling to wrapper div
- Set iframe height=100% and scrolling="no"
https://jsfiddle.net/oleymedia/f4L6skmy/
Does not work.
Desktop: The iframe sets its height to 100% of the div height iPad: Still no scrolling