Do not use the bottom margin hack on Chrome for iOS since it is not needed

This commit is contained in:
Kovid Goyal 2017-05-29 10:23:51 +05:30
parent 622a7fcafd
commit 1cf008ab2a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -62,10 +62,10 @@ def margin_elem(sd, which, id, onclick):
)
if onclick:
ans.addEventListener('click', onclick)
if is_ios and which is 'margin_bottom':
# On iOS 100vh includes the size of the navbar and there is no way to
if is_ios and which is 'margin_bottom' and not /CriOS\//.test(window.navigator.userAgent):
# On iOS Safari 100vh includes the size of the navbar and there is no way to
# go fullscreen, so to make the bottom bar visible we add a margin to
# the bottom bar
# the bottom bar. CriOS is for Chrome on iOS.
ans.style.marginBottom = '25px'
return ans