Allow immediate handoff from "whole page" div to <html> if <html> is only scrollable when zoomed in
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
People
(Reporter: csheany, Unassigned)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Android 7.1.1; Tablet; rv:67.0) Gecko/67.0 Firefox/67.0
Steps to reproduce:
- Open this bug
- Zoom in
- Scroll
Actual results:
The page gets stuck
Expected results:
To be determined
Updated•6 years ago
|
Botond, would you mind taking a look?
Comment 2•6 years ago
|
||
We don't do scroll handoff by design on Android. So when you reach the end of the scrollable div it won't hand off to scrolling the visual viewport around.
Thank you for your response.
Would you mind elaborating?
This seems like a regression.
Comment 5•6 years ago
|
||
If it's a regression please use mozregression to find the regressing changeset.
It seems to depend on page/ element length.
Should it always happen at the same point?
Are there consequences to enabling the pref?
Comment 7•6 years ago
|
||
(In reply to csheany from comment #0)
Actual results:
The page gets stuck
I assume you mean it gets stuck until you lift your finger. With the next gesture, you should be able to continue scrolling to the end.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
We don't do scroll handoff by design on Android.
(To be more precise, we don't do "immediate" scroll handoff, that is handoff within the same gesture.)
So when you reach the end of the scrollable div it won't hand off to scrolling the visual viewport around.
(Until you lift your finger and start a new gesture.)
(In reply to csheany from comment #6)
It seems to depend on page/ element length.
Right, if a bug page is short enough to fit completely onto the screen when zoomed out, the <div> on the page is not scrollable, and the only thing that ever scrolls is the viewport (so there is no handoff).
Are there consequences to enabling the pref?
Which pref?
Comment 8•6 years ago
|
||
Perhaps we could heuristically detect cases where a scrollable <div> is the main scrollable element on a page, and allow immediate handoff from it to the viewport?
Though I seem to recall people saying this kind of page structure is an anti-pattern. Not sure whether that's still the accepted wisdom.
Kohei, can you remind me why Bugzilla uses this kind of page structure (instead of making the <html> itself scrollable, and using position:fixed
for the header)?
Comment 9•6 years ago
|
||
This is mainly because we are migrating to an app-ish framing UI that can be seen on Slack, Facebook Messenger, etc. Currently only the header is fixed, but 2-column layout is on the way. FYI, Google News uses the same page structure.
Comment 10•6 years ago
|
||
And we are planning a minimum mobile/tablet optimization work later this year.
Comment 11•6 years ago
|
||
Ok, fair enough.
I'm going to reopen this bug to track the suggestion from comment 8:
Perhaps we could heuristically detect cases where a scrollable <div> is the main scrollable element on a page, and allow immediate handoff from it to the viewport?
Randall, Snorp, as you were the drivers behind the "no immediate handoff on Android" change, can you comment on whether this sounds reasonable to you?
Reporter | ||
Comment 12•6 years ago
|
||
To catch up...
The page does not fit the screen when zoomed out.
The pref I was referring to was apz.allow_immediate_handoff.
In the screenshot, the green rectangle does not account for the rest of the page (regression?)
Dragging my finger just before that point is when scrolling breaks.
Comment 13•6 years ago
|
||
(In reply to csheany from comment #12)
The pref I was referring to was apz.allow_immediate_handoff.
Yes, setting that pref to true should allow you to scroll the entire page without a pause / having to lift your finger. I just checked and it does for me.
Reporter | ||
Comment 14•6 years ago
|
||
And the screenshot?
I think that is the issue here.
Comment 15•6 years ago
|
||
Each scrollable element gets its own minimap. The one shown in the screenshot is the one for the <html> element (which is the only one for which the blue (visual) and red (layout) viewports can be different).
If you scroll around to where the origin of the scrollable <div> is, I expect you'll find the <div>'s minimap.
That said, there is something unexpected about the minimap shown in the screenshot: I would expect the green area to be no larger than the red (that is, the <html> element shouldn't have a layout scroll range). Leaving needinfo on me to investigate that.
Reporter | ||
Comment 16•6 years ago
|
||
Reporter | ||
Comment 17•6 years ago
|
||
Reporter | ||
Comment 18•6 years ago
|
||
Before you say I am not sure what the screenshot is intedned to illustrate... :)
The viewports of each element in this case happen to have the same with which may have caused confusion.
Also, scrolling is smooth past the point at which the page initially loads so I am not sure if your theory is correct.
.
Maybe the summary should be edited to reflect that.
This clarification might make it easier to track down the regression.
Maybe immediate handofff could be reinvestigated though as the behavior is an improvement.
Reporter | ||
Comment 19•6 years ago
|
||
I still don't quite understand scrollable <div> but that is another story. :)
Reporter | ||
Comment 20•6 years ago
|
||
An example of a paged with a "fixed" length where the issue still occurs...
Reporter | ||
Comment 21•6 years ago
|
||
Botond, were you thinking this was Bug 1523329 with a different format?
Reporter | ||
Comment 22•6 years ago
|
||
Comment 23•6 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #15)
That said, there is something unexpected about the minimap shown in the screenshot: I would expect the green area to be no larger than the red (that is, the <html> element shouldn't have a layout scroll range). Leaving needinfo on me to investigate that.
After taking a closer look, I realized the screenshot actually shows both minimaps superimposed. The larger green area belongs to the <div>. So nothing unexpected there.
Comment 24•6 years ago
|
||
(In reply to csheany from comment #21)
Botond, were you thinking this was Bug 1523329 with a different format?
No relation. Bug 1523329 was about not being able to scroll at all. Here, you can scroll, you just need to lift your finger for the scroll to transfer from one scrollable element to another.
(In reply to csheany from comment #19)
I still don't quite understand scrollable <div> but that is another story. :)
By "scrollable <div>" I just mean an element on the page other than the root (<html> element) which is scrollable. Such elements are commonly <div>s but don't have to be. In Bugzilla, most of the page (everything except the fixed header) is taken up by a scrollable <div>. This is why we have the handoff issue when zoomed in - there are two scrollable elements, the <html> and the <div>.
Reporter | ||
Comment 26•6 years ago
|
||
I just meant that the page fit the screen and wasn't scrollable upon loading.
Reporter | ||
Comment 27•6 years ago
|
||
What I am noticing is that the page thinks it reached the bottom before actually doing so.
Reporter | ||
Comment 28•6 years ago
|
||
Before getting them involved, should we make sure that we are on the same "page"?
I think a few details are being overlooked.
Comment 29•6 years ago
|
||
@csheany Can you find the same issue on any other site? If not, I’d suggest closing this bug as WONTFIX. I guess Bugzilla is a very special case; we have fixed the header with CSS Flexbox (a modern technique) but never officially supported mobile and tablet devices. I really don’t want to waste Firefox developer resources here (/me looks botond) especially because we’re planning a mobile optimization later this year, as I said earlier.
Comment 30•6 years ago
|
||
I’d say, as early as Q2.
Reporter | ||
Comment 31•6 years ago
|
||
I'm not sure which other sites have the same format.
It seems like a browser issue as it doesn't happen on every page
It would be nice to get fixed I just think at the might the focus is on the wrong aspect.
At some point with enough comments this page might no longer have an issue which is why I posted the example in Comment 20.
Comment 32•6 years ago
|
||
(In reply to Kohei Yoshino [:kohei] (Bugzilla UX) (FxSiteCompat) from comment #29)
Can you find the same issue on any other site?
Any site whose main scrollable element is not the <html> element is going to be affected.
For example, Google News (which you mentioned earlier) has the same issue if you check "Always enable zoom".
Comment 33•6 years ago
|
||
(In reply to csheany from comment #28)
Before getting them involved, should we make sure that we are on the same "page"?
I think a few details are being overlooked.
I haven't seen anything so far to indicate that the diagnosis in comment 7 is wrong.
If you believe it is, can you explain why?
Reporter | ||
Comment 34•6 years ago
|
||
In the second sceenshot the bottom of the page is not view but the issue still occurs.
As menitoned in Comment 18 scrolling is smooth past the point which is.
Why isn't the green area capturing the entire <div>?
Comment 35•6 years ago
|
||
(In reply to csheany from comment #34)
In the second sceenshot the bottom of the page is not view but the issue still occurs.
The issue is going to occur on any Bugzilla page where the entire page doesn't fit onto the screen on load.
Why isn't the green area capturing the entire <div>?
The green area in that screenshot does represent the entire <div>.
Reporter | ||
Comment 36•6 years ago
|
||
Something is getting lost in translation.
The summary says "if viewport is only scrollable when zoomed in" but the viewport is scrollable when zoomed out.
Reporter | ||
Comment 37•6 years ago
|
||
Comment 7 and Comment 35 seem to conflict with each other.
Comment 38•6 years ago
•
|
||
(In reply to csheany from comment #36)
Something is getting lost in translation.
The summary says "if viewport is only scrollable when zoomed in" but the viewport is scrollable when zoomed out.
Ok, I understand the confusion now.
First, as "viewport" is an overloaded term, let me clarify that in this context by "viewport" I meant the <html> element. (I edited the bug summary accordingly.)
On Bugzilla, the <html> is only ever scrollable when zoomed in. If the page is scrollable when zoomed out, the (only) thing that's scrolling is the <div>.
The issue occurs when both the <div> and the <html> are scrollable (otherwise, there is no "handoff").
The "if <html> is only scrollable when zoomed in" in the bug title does not refer to the conditions that trigger this bug, but rather a limitation on the solution I'm proposing: I'm proposing to allow immediate handoff from the <div> to the <html>, but limited to cases where the <html> is only scrollable when zoomed in. (Allowing immediate handoff from a <div> to the <html> in general would defeat the original intent behind disallowing immediate handoff on Android (bug 1230552).)
Comment 39•6 years ago
|
||
(In reply to csheany from comment #37)
Comment 7 and Comment 35 seem to conflict with each other.
I don't think so.
(In reply to Botond Ballo [:botond] from comment #7)
Right, if a bug page is short enough to fit completely onto the screen when zoomed out, the <div> on the page is not scrollable, and the only thing that ever scrolls is the viewport (so there is no handoff).
page fits completely onto screen when zoomed out (indicating <div> is not scrollable) ==> issue does not occur
(In reply to Botond Ballo [:botond] from comment #35)
The issue is going to occur on any Bugzilla page where the entire page doesn't fit onto the screen on load.
page does not fit onto screen when zoomed out (indicating <div> is scrollable) ==> issue occurs
Reporter | ||
Comment 40•6 years ago
|
||
I'm not sure which parts of the page are which but I still think the issue is the green rectangle stopping short.
That is what's unexpected.
Comment 41•6 years ago
|
||
(In reply to csheany from comment #40)
I'm not sure which parts of the page are which but I still think the issue is the green rectangle stopping short.
That is what's unexpected.
Stopping short of what? If you mean that the minimap as a whole isn't as tall as the screen, that's just how we size the minimap for a page of these dimensions. We try to keep the minimap's aspect ratio matching that of the page, but there is also a limit on the width, so doesn't obscure too much of the page. In this case, the width limit prevails, and to maintain aspect ratio the minimap is shorter than the screen.
Reporter | ||
Comment 42•6 years ago
|
||
Actual results:
Blue line... yellow line... green line
Expected results:
Blue line
Yellow line
Green line
Comment 43•6 years ago
|
||
(In reply to csheany from comment #42)
Expected results:
Blue line
Yellow line
Green line
Are we looking at the same screenshot (https://bugzilla.mozilla.org/attachment.cgi?id=9049065)? Because that is what I see.
Reporter | ||
Comment 44•6 years ago
|
||
Comment 45•6 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #43)
Are we looking at the same screenshot (https://bugzilla.mozilla.org/attachment.cgi?id=9049065)? Because that is what I see.
Oh, I think I know what you're talking about. You're looking at this screenshot (https://bug1531474.bmoattachments.org/attachment.cgi?id=9049066), and wondering why the div's minimap shows us being all the way at the bottom, when the content we're seeing is not in fact at the bottom of the page.
The reason for this is the nested scrolling on the page. The div is indeed scrolled to its bottom, but the div's "viewport" (the blue rect on the div's minimap) is larger than the screen. The div's blue rect corresponds roughly to the <html>'s red rect (modulo the fixed header), and within that we are scrolled to the top.
Reporter | ||
Comment 46•6 years ago
|
||
Would you mind explaining the nested scrolling part a little more?
IIRC, the handoff change was done in bug 1230552, which was about flings in a subframe being handed off to the parent, resulting in a bad experience.
Comment 48•6 years ago
|
||
(In reply to csheany from comment #46)
Would you mind explaining the nested scrolling part a little more?
I would be happy to, but this is getting off-topic for Bugzilla. Please find me in the #apz channel on the Mozilla IRC and ask there.
Comment 49•6 years ago
•
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #47)
IIRC, the handoff change was done in bug 1230552, which was about flings in a subframe being handed off to the parent, resulting in a bad experience.
Yep, that's right.
Here, I'm proposing that we relax that restriction a bit, and allow immediate handoff in a specific set of cases: pages like Bugzilla that have a "full-page" div that that's scrollable, and where handoff only occurs because zooming in can make the <html> scrollable as well. I was wondering if you think that's reasonable.
Updated•6 years ago
|
(In reply to Botond Ballo [:botond] from comment #49)
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #47)
IIRC, the handoff change was done in bug 1230552, which was about flings in a subframe being handed off to the parent, resulting in a bad experience.
Yep, that's right.
Here, I'm proposing that we relax that restriction a bit, and allow immediate handoff in a specific set of cases: pages like Bugzilla that have a "full-page" div that that's scrollable, and where handoff only occurs because zooming in can make the <html> scrollable as well. I was wondering if you think that's reasonable.
That seems reasonable.
Updated•6 years ago
|
Updated•2 years ago
|
Description
•