Skip to content
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

Fix zoom on quantity input for iOS #2842

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

KaichenWang
Copy link
Contributor

@KaichenWang KaichenWang commented Jul 14, 2023

PR Summary:

Set quantity input font-size to 1.6rem (16px equivalent) to prevent iOS safari from zooming in on the input when focused.

Why are these changes introduced?

Fixes:

When you focus the qty field, there's a zoom that makes it harder to see the rest of the row (as well as the QTY rules popover) (from @vernalkick) Video 1 | Video 2

What approach did you take?

Set quantity input font-size to 1.6rem (16px equivalent) to prevent iOS safari from zooming in on the input when focused

Other considerations

Decision log

# Decision Alternatives Rationale Downsides
1 Increase quantity input font-size to 16px equivalent Set meta tag viewport to include maximum-scale=1 or user-scalable=0 Safer from a11y perspective to increase font-size versus modifying viewport properties - MDN docs. Increasing quantity input font-size may reduce the max number of digits displayed.

Visual impact on existing themes

Font-size for quantity inputs are increased.

Testing steps/scenarios

  • Visually inspect quantity inputs

Demo links

Checklist

…OS safari from zooming in on the input when focused
@KaichenWang KaichenWang requested a review from kmeleta July 14, 2023 15:58
@KaichenWang KaichenWang marked this pull request as ready for review July 14, 2023 15:58
@KaichenWang KaichenWang requested a review from sofiamatulis July 14, 2023 16:00
Copy link
Contributor

@kmeleta kmeleta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Interesting, never noticed that before

@KaichenWang KaichenWang requested a review from nicklepine July 14, 2023 17:53
@KaichenWang KaichenWang merged commit 74ab49f into main Jul 14, 2023
@KaichenWang KaichenWang deleted the fix-zoom-on-quantity-input-focus-ios branch July 14, 2023 17:57
@KaichenWang KaichenWang mentioned this pull request Jul 14, 2023
3 tasks
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
…OS safari from zooming in on the input when focused (Shopify#2842)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants