Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Screen zooms in when a Bootstrap modal is opened on iOS 9 Safari

When I open a Bootstrap 3 modal on iOS9 Safari, the screen zooms in. It is working as expected on the Chrome app on iPhone. Below are the pictures which show the issue.

Safari screenshot:

safari screenshot

Chrome screenshot(expected behavior):

chrome screenshot

like image 345
Sandeep Singh Avatar asked Sep 20 '15 04:09

Sandeep Singh


People also ask

How do I stop Safari from zooming in iPhone?

In the viewport meta tag above: initial-scale=1 sets the initial zoom of the page to 1.0 of that width, or no zoom at all. maximum-scale=1 fixes the maximum scale of the page to 1.0. This prevents Safari from auto-zooming while still allowing the user to zoom in manually.

Why is Safari zoomed in on iPhone?

How to set the Force Zooming back to the default setting in iPadOS/iOS? To set back from Force Zooming to deafult in Safari iOS/iPadOS, tap on the Settings in your iOS device and then tap on Safari settings. Now, tap on Page Zoom and select 100% which is the default size.


1 Answers

The following code fixed the issue for me (and some other people -> see GitHub link):

body {   padding-right: 0px !important }  .modal-open {   overflow-y: auto; } 

Source: https://github.com/jschr/bootstrap-modal/issues/64#issuecomment-55794181

like image 57
Dominic Avatar answered Sep 24 '22 03:09

Dominic