Closed Bug 1638773 Opened 10 months ago Closed 9 months ago

device-width conflict values in between initial-scale and width


(Core :: Panning and Zooming, defect, P1)

78 Branch



Webcompat Priority ?
Tracking Status
firefox-esr68 --- unaffected
firefox76 --- unaffected
firefox77 + verified
firefox78 + fixed


(Reporter: karlcow, Assigned: bradwerth)


(Regression, )


(Keywords: regression)


(1 file)

There is a site with these values

<meta name="viewport"

The site is hugely blown out.

The current specification says:

device-width and device-height are translated to 10

so we end up with

<meta name="viewport"

which should win?

  • Chrome shows the site with width=device-width
  • Firefox shows the site x10 zoom

This is yet another edge case.

note: can be reproduced on rdm.

see details on

I'd say the scale value should be 1.0.
Does the site work fine before bug 1598145?

Regressed by: 1598145

Set release status flags based on info from the regressing bug 1598145

Flags: needinfo?(bwerth)
Assignee: nobody → bwerth
Flags: needinfo?(bwerth)
Component: DOM: Core & HTML → Panning and Zooming

This is solvable by adding a clamp to the code introduced in Bug 1598145. I'll propose a patch with a fix and a web platform test.

This corrects the handling of user-scalable=no to first apply the clamping
of the initial-scale (whether specified or default) to the min and max scales.

Severity: -- → S2
Priority: -- → P3
Pushed by
Allow initial-scale clamping when user-scalable=no, add WPT. r=hiro
Created web-platform-tests PR for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Upstream PR merged by moz-wptsync-bot

Thanks to :hiro for bringing this to the attention of the Fenix team. Could we please request this be uplifted to 77 so that we can get this fix for the Fenix product market fit experiment?

Flags: needinfo?(hikezoe.birchill)

Comment on attachment 9150299 [details]
Bug 1638773: Allow initial-scale clamping when user-scalable=no, add WPT.

Beta/Release Uplift Approval Request

  • User impact if declined: Sites with meta viewport tags with user-scalable=no and very large or very small initial-scale will appear at unreadable sizes in GeckoView.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The code change only applies when user-scalable=no, which is an uncommon pattern and noted as bad practice (though permitted by spec).
  • String changes made/needed:
Attachment #9150299 - Flags: approval-mozilla-beta?
Flags: needinfo?(hikezoe.birchill)

Comment on attachment 9150299 [details]
Bug 1638773: Allow initial-scale clamping when user-scalable=no, add WPT.

Fixes an important mobile web compat issue affecting Fenix. Approved for 77.0b9.

Attachment #9150299 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: in-testsuite+

Changing the priority to p1 as the bug is tracked by a release manager for the current beta.
See What Do You Triage for more information

Priority: P3 → P1
Blocks: 1639964

Thank you Brad and Emily!

Verified as fixed on the reported website, on Fenix Beta 5.1-beta2.

You need to log in before you can comment on or make changes to this bug.