From 2a2cc0460682ad327673c3999aea2e5ea91ed311 Mon Sep 17 00:00:00 2001 From: VodkaBears Date: Sun, 11 Oct 2015 22:55:00 +0300 Subject: [PATCH] Fix #184: IOS 9 safari scaling issues --- src/remodal.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/remodal.js b/src/remodal.js index 4f8f28b..27bac95 100644 --- a/src/remodal.js +++ b/src/remodal.js @@ -113,6 +113,14 @@ style.OAnimationName !== undefined; })(); + /** + * Is iOS? + * @private + * @const + * @type {Boolean} + */ + var IS_IOS = /iPad|iPhone|iPod/.test(navigator.platform); + /** * Current modal * @private @@ -228,6 +236,10 @@ * @private */ function lockScreen() { + if (IS_IOS) { + return; + } + var $html = $('html'); var lockedClass = namespacify('is-locked'); var paddingRight; @@ -249,6 +261,10 @@ * @private */ function unlockScreen() { + if (IS_IOS) { + return; + } + var $html = $('html'); var lockedClass = namespacify('is-locked'); var paddingRight;