-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: touch-action on ion-content prevents pinch zoom #22805
Comments
Thanks for the issue.
So as for a workaround, you need to do two things:
ion-content::part(scroll) {
touch-action: pan-y pinch-zoom;
}
Unfortunately we do not have control over this as the zooming is handled by the OS. This is true of any Single Page App, not just Ionic Framework. In terms of a fix, we can look into adding the |
As an additional note, enabling the zooming/scaling as mentioned above causes unpredictable behavior after routing. For example, if a user enters login info in an input on an iPhone (which zooms in for the input) and then is routed to the dashboard, the zoom never resets, meaning that parts of the page are cut off and/or not visible. |
Thank you for this issue! I have added a change to help with this, set to go live in Framework v6. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[ ] 4.x
[x] 5.x
Current behavior:
Zooming and scaling are disabled via a meta tag, making the app fail accessibility checks (such as axe browser extension). Users who rely on zooming/scaling in order to discern content have no option that makes the app usable.
Expected behavior:
The user should be able to zoom in and out at their discretion. After routing to a new page within the app, the scaling should be reset in order to provide a better user experience.
Steps to reproduce:
yarn
in the app root to install packagesionic serve
to open the app in the browserRelated code:
Sample Ionic Angular app: https://github.com/Ksan8/ionicAngular
This is the relevant code in index.html:
Other information:
axe documentation: Zooming and scaling must not be disabled
Theoretically this issue could be fixed by changing the meta tag to include
user-scalable=yes
and either leaving outmaximum-scale=1.0
or setting it much higher. If only this is done, however, it does not seem to fix the problem. Testing the app on an actual Android device, changing the scale via pinching & zooming does not work.Ionic info:
The text was updated successfully, but these errors were encountered: