Skip to content

prevent mobile viewport auto-zoom on input focus#5152

Merged
diegoteran merged 1 commit into
masterfrom
resize
May 22, 2026
Merged

prevent mobile viewport auto-zoom on input focus#5152
diegoteran merged 1 commit into
masterfrom
resize

Conversation

@diegoteran
Copy link
Copy Markdown
Collaborator

Mobile WebKit/Blink engines (such as Safari and Chrome on iOS) automatically zoom in the entire page viewport when a text or numeric input is focused if the computed font-size is strictly less than 16px. This page-level zoom remains locked even after the input is blurred, disrupting the layout and forcing users to manually pinch-to-zoom out to return to normal dimensions. This change fixes the issue globally for the documentation examples and provides educational guidelines for developers copying the patterns:

  1. Systemic Styles Guard: Added a scoped style rule in examples.css setting 'font-size: 16px' for all inputs and selects inside floating '.controls' containers. This covers active widgets (e.g. Model Transformations, Post-Processing, variant swapping) across almost all example pages without impacting other standard utility forms.

  2. Developer Guidance Tip: Appended an educational "Mobile WebUX Tip" callout under the Model Transformations demo text block inside scenegraph/index.html, explaining the 16px browser threshold quirk to developers who copy-paste the custom markup blocks for their own standalone applications. Verified layout presentation and viewport locking (locked at stable 1.0x scale) under small-screen interaction models. Playwright test suite passes cleanly.

Reference Issue

Mobile WebKit/Blink engines (such as Safari and Chrome on iOS) automatically
zoom in the entire page viewport when a text or numeric input is focused if
the computed font-size is strictly less than 16px. This page-level zoom remains
locked even after the input is blurred, disrupting the layout and forcing
users to manually pinch-to-zoom out to return to normal dimensions.
This change fixes the issue globally for the documentation examples and
provides educational guidelines for developers copying the patterns:
1. Systemic Styles Guard: Added a scoped style rule in examples.css setting
   'font-size: 16px' for all inputs and selects inside floating '.controls'
   containers. This covers active widgets (e.g. Model Transformations,
   Post-Processing, variant swapping) across almost all example pages
   without impacting other standard utility forms.

2. Developer Guidance Tip: Appended an educational "Mobile WebUX Tip" callout
   under the Model Transformations demo text block inside scenegraph/index.html,
   explaining the 16px browser threshold quirk to developers who copy-paste
   the custom markup blocks for their own standalone applications.
Verified layout presentation and viewport locking (locked at stable 1.0x scale)
under small-screen interaction models. Playwright test suite passes cleanly.
@diegoteran diegoteran merged commit 98c3817 into master May 22, 2026
10 checks passed
@diegoteran diegoteran deleted the resize branch May 22, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant