From cb11bb5c540c6a156be8d9cc60176207a4177a8c Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 26 Sep 2013 17:40:13 +0100 Subject: Fix iOS 7 display to clear scroll bar If iOS7 set a class on the body and then use this to override various styles as well as the position of the map --- src/js/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/js/app.js') diff --git a/src/js/app.js b/src/js/app.js index 1818b6e..0f2a7bf 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -243,6 +243,11 @@ var tpl = { if ( typeof device !== 'undefined' && device.platform === 'iOS' ) { var model = parseInt(device.model.replace('iPhone',''), 10); FMS.iPhoneModel = model; + + // fix overlap of status bar in ios7 + if (parseFloat(window.device.version) === 7.0) { + $('body').addClass('ios7'); + } } _.extend(FMS, { @@ -261,6 +266,9 @@ var tpl = { } FMS.windowHeight = $(window).height(); + if ( $('body').hasClass('ios7') ) { + FMS.windowHeight -= 20; + } if ( localStorage.usedBefore ) { FMS.usedBefore = 1; -- cgit v1.2.3