Material-ui: [Modal] Zoom out stuck on iPhone (fullscreen)

Created on 7 Jan 2020  路  9Comments  路  Source: mui-org/material-ui

Dialog Fullscreen does not zoom out after zooming in on IPhone.
We tested this on: IPhone X, SE, XR, 9, 10. Different IOS versions. (IOS 13, 13.3 and 12.4)

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

Problem: It does not Zoom Out, user stuck on Zoom.

Expected Behavior 馃

Expected Behaviour: Screen Zooms Out. (It works on Android)

Steps to Reproduce 馃暪

Steps:

  1. Using an IPhone
  2. Go to to https://material-ui.com/components/dialogs/#dialog
  3. Scroll Down to FullScreen Dialog Example and Open the Dialog
  4. Pinch Zoom in
  5. Try to Zoom Out

Context 馃敠

We are using fullscreen Dialog for our mobile app and this has been reported as an issue. Upon investigation we realised this is a MUI bug as we can replicate it with the demo dialog.

Your Environment 馃寧

| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.5.2 |
| React | v.16.9 |
| Browser | Chrome, Safari (Didn't check others) |
| TypeScript | v3.5.3 |
| etc. | |

bug 馃悰 Modal good first issue

All 9 comments

What do you think of this diff?

diff --git a/packages/material-ui/src/Backdrop/Backdrop.js b/packages/material-ui/src/Backdrop/Backdrop.js
index 543bf6914..2b919c680 100644
--- a/packages/material-ui/src/Backdrop/Backdrop.js
+++ b/packages/material-ui/src/Backdrop/Backdrop.js
@@ -19,8 +19,6 @@ export const styles = {
     left: 0,
     backgroundColor: 'rgba(0, 0, 0, 0.5)',
     WebkitTapHighlightColor: 'transparent',
-    // Disable scroll capabilities.
-    touchAction: 'none',
   },
   /* Styles applied to the root element if `invisible={true}`. */
   invisible: {
diff --git a/packages/material-ui/src/Modal/SimpleBackdrop.js b/packages/material-ui/src/Modal/SimpleBackdrop.js
index ec76fd345..c15705f26 100644
--- a/packages/material-ui/src/Modal/SimpleBackdrop.js
+++ b/packages/material-ui/src/Modal/SimpleBackdrop.js
@@ -12,8 +12,6 @@ export const styles = {
     left: 0,
     backgroundColor: 'rgba(0, 0, 0, 0.5)',
     WebkitTapHighlightColor: 'transparent',
-    // Disable scroll capabilities.
-    touchAction: 'none',
   },
   /* Styles applied to the root element if `invisible={true}`. */
   invisible: {

Does it fix the issue on your side? Do you want to submit a pull request?

I suspect a bug on iOS. This line was introduced to solve #12094 (2018). However, @joshwooding found a better approach, later on, #16162 (2019). I believe we do no longer need this logic :).

+1, having the same issue using the Modal component.

@xddz9 Do you want to submit a pull request? :)

Has a PR being set up for this Issue? I am happy to try and fix it my self if nobody hasn't already.

@TommyJackson85 As far as I鈥檓 aware nothing has been done yet so give it a go :)

Ok I will try. Would Chrome developer tools be enough to test this on my mobile platforms? Can anybody recommend a better method?

I tested this on iPhone 11 regular and the bug is with this device also.
Here is the PR request which I will keep updating as I go.

@joshwooding I have similar issue.

I am using
React - V16.8.6
material ui - v3.8.3
IOS - 13
I wanna know if this issue exists in 3.8.3 version of material ui. Can you confirm?

@karthik922 Upgrade to the latest version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mb-copart picture mb-copart  路  3Comments

sys13 picture sys13  路  3Comments

anthony-dandrea picture anthony-dandrea  路  3Comments

zabojad picture zabojad  路  3Comments

revskill10 picture revskill10  路  3Comments