www.softrans.ro - Unable to scroll horizontally due to meta viewport
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Not tracked)
People
(Reporter: jgraham, Assigned: twisniewski)
References
(Depends on 1 open bug, )
Details
(Keywords: webcompat:platform-bug, webcompat:site-report)
User Story
platform:android impact:content-missing configuration:general affects:all branch:release diagnosis-team:layout
Attachments
(4 files)
Environment:
Operating system: Android 12
Firefox version: Firefox Mobile 125.0
Steps to reproduce:
Unable to scroll horizontally to see the entire page.
Actual Behavior:
Missing items
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in Firefox Nightly, Firefox Release
- Does not reproduce in Chrome
Created from https://github.com/webcompat/web-bugs/issues/136624
Updated•8 months ago
|
Assignee | ||
Comment 1•7 months ago
|
||
This also reproduces for me in the responsive design mode in Firefox with a local copy of the page.
The page is using a <meta> viewport element:
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
If I change it to just width=device-width
then I can scroll the page in Firefox as well. Chrome allows horizontal scrolling regardless.
Let's move this to Layout: Scrolling
for now.
Assignee | ||
Comment 2•7 months ago
|
||
:hiro, do you perhaps know what's going on here?
Comment 3•7 months ago
|
||
The body element has overflow-x: hidden
, I don't know how Chrome makes the contents horizontally scrollable with overflow-x: hidden
.
Comment 4•7 months ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #3)
The body element has
overflow-x: hidden
, I don't know how Chrome makes the contents horizontally scrollable withoverflow-x: hidden
.
Well, to be precise, even with overflow:hidden
, the container can be scrollable by programmatic ways such as scrollTo(), but it's not scrollable by touch gestures or some such.
Assignee | ||
Comment 5•7 months ago
|
||
Based on this comment do you think it might be related to visual vs layout viewport choices they have made?
Comment 6•7 months ago
•
|
||
Yeah, it looks somewhat related to me. But in this specific case, the meta viewport tag has "initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0", so it's slightly different from the chrome's specific behavior.
You can see this behavior difference on desktop browsers as well. If you open the site on Firefox desktop and if you narrow down the browser window width, you will see the same result on desktop as well. And Chrome's desktop behaves as mobile Chrome. So it implies it's not mobile specific. I.e. meta viewport is not directly related to.
Assignee | ||
Comment 7•6 months ago
|
||
Updated•6 months ago
|
Assignee | ||
Updated•6 months ago
|
Comment 9•6 months ago
|
||
bugherder |
Assignee | ||
Updated•6 months ago
|
Updated•4 months ago
|
Comment 10•4 months ago
|
||
Here's a somewhat reduced testcase. This reproduces the bug in Responsive Design Mode on desktop -- in Chrome (with RDM), I can click-and-drag to scroll horizontally, whereas in Firefox I cannot.
Comment 11•4 months ago
|
||
So the important factor here (on top of the overflow-x:hidden
) is that this site has display:table
on the body
element, for some reason. In Chrome, that makes horizontal scrolling just work (despite overflow-x:hidden
).
I'll spin off a platform bug to track that interop difference (not sure if it's exactly our bug or a Chrome bug).
Comment 12•4 months ago
|
||
Actually there's one more important factor that's necessary for triggering the bug: minimum-scale
in the viewport tag (which is relevant to the comment that twisniewski linked in comment 5, where bokand mentioned "You can prevent the layout viewport expansion by setting a minimum-scale in your viewport meta tag")
Comment 13•4 months ago
|
||
Comment 14•4 months ago
|
||
Comment 15•4 months ago
•
|
||
Comparing testcases 2 and 3 between browsers (where the only difference is that testcase 3 lacks minimum-scale
in its viewport meta tag):
Scrollable: Testcase 2 Testcase 3
Chrome (Desktop) Yes Yes
Chrome (Desktop/RDM) Yes Yes
Chrome (Android) Yes Yes
Safari (macOS) Yes Yes
Safari (iOS) Yes Yes
Edge 18 (win10) Yes Yes
Firefox (Desktop) No No
Firefox (Desktop/RDM) No Yes
Firefox (Android) No Yes
So: hiro's right in comment 6 that we've got some sort of fundamental difference vs. all other engines (including pre-Chromium EdgeHTML) that's not mobile-specific.
(Though it is interesting that we happen to agree with other browsers in the one case of mobile-or-RDM and when minimum-scale
is missing from the viewport tag.)
Comment 16•4 months ago
|
||
Let's morph this bug into a site report bug, particularly given that we've already landed a site-patch here. I've spun off bug 1918789 to serve as a platform bug here.
Description
•