Closed Bug 1219391 Opened 4 years ago Closed 4 years ago

Scroll snapping on home-screen panels doesn't work if you keep your finger still before releasing

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
blocking-b2g 2.5?
Tracking Status
firefox44 --- fixed

People

(Reporter: cwiiis, Assigned: kats)

References

Details

Attachments

(1 file)

[Blocking Requested - why for this release]: Reasonably easily encountered bug that looks very bad on primary UI.

Home screen has two panels which can be horizontally scrolled between. Mandatory scroll snap points are set so that only one can be visible at a time.

If while panning, you stop anywhere outside of the two extents and keep your finger still long enough for the horizontal scrollbar to disappear (which is weird, because this doesn't happen scrolling a straight horizontal page in the browser), then release your finger, scroll snapping will not activate.

STR (on FirefoxOS):

1. On the home screen, place finger on screen and drag slightly left (so that the apps panel scrolls slightly, but not all the way, to the left.
2. Keep finger held until horizontal scrollbar at the bottom of the screen starts to fade out
3. Release finger

Expected:

View snaps to either apps panel or pinned pages panel.

Actual:

View remains static, leaving the home screen in an inconsistent state.
A quick investigation seems to indicate that in this scenario:
- the handoff chain consists of (at least) two scrollable frames. The inner one is the one that scrolls vertically and the outer one scrolls horizontally
- when the finger is lifted, a fling animation is run on the inner APZC. the velocity there is zero so the fling animation terminates
- when the fling animation terminates it does request a snap on the inner scrollframe
- the snap needs to be requested on the outer scrollframe, since that's the one which was scrolled horizontally
Assignee: nobody → bugmail.mozilla
Bug 1219391 - Request snapping for the entire handoff chain when ending the fling animation. r=
Attachment #8680176 - Flags: review?(botond)
Sometimes I wonder if some of the APZ state (such as "the user has lifted their finger, things should now animate/snap back to a stable position") should be tracked at the APZCTM level rather than at the per-APZC level.
Comment on attachment 8680176 [details]
MozReview Request: Bug 1219391 - Request snapping for the entire handoff chain when ending the fling animation. r=

https://reviewboard.mozilla.org/r/23589/#review21077
Attachment #8680176 - Flags: review?(botond) → review+
(In reply to Botond Ballo [:botond] from comment #3)
> Sometimes I wonder if some of the APZ state (such as "the user has lifted
> their finger, things should now animate/snap back to a stable position")
> should be tracked at the APZCTM level rather than at the per-APZC level.

Yeah it's a tough architectural problem :/. It could be implemented either way and there's advantages/disadvantages to both. I don't really know if doing it that way would be better either.
https://hg.mozilla.org/mozilla-central/rev/33df0bbcc1ae
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Duplicate of this bug: 1218318
Duplicate of this bug: 1226438
Duplicate of this bug: 1227420
Duplicate of this bug: 1230008
You need to log in before you can comment on or make changes to this bug.