Closed Bug 1088700 Opened 8 years ago Closed 8 years ago

Pressing the home button on the home screen instantly returns to the top of the home screen instead of smoothly scrolling


(Firefox OS Graveyard :: Gaia::Homescreen, defect)

Gonk (Firefox OS)
Not set


(Not tracked)

2.1 S8 (7Nov)


(Reporter: cwiiis, Assigned: kgrandon)



(Keywords: regression, Whiteboard: [systemsfe])


(1 file)

Pressing the home button on the home screen should (and used to, about a week ago and all times prior) smoothly scroll to the top of the screen. It now instantly jumps to the top of the screen.

I believe this is a platform regression, probably from bug 1010538. It could be that we need to alter something in the homescreen code, but let's get the regression window first so we know what to look at.
Kip - did anything change here recently? Do we now need a pref for this to enable smooth scrolling?
Depends on: 1010538
Flags: needinfo?(kgilbert)
(In reply to Kevin Grandon :kgrandon from comment #1)
> Kip - did anything change here recently? Do we now need a pref for this to
> enable smooth scrolling?
The home button has always scrolled smoothly to the top, so there is no need for a preference.

Originally this was implemented in Javascript, but was a bit janky.  This was updated to use the CSSOM-View Smooth Scrolling DOM methods for a smoother result.  The CSSOM-View Smooth Scrolling specification has since evolved -- I have landed an update in Gecko that updates to the new specification.  This breaks the one-line piece of code added to the home screen app, resulting in instant scrolling when it should be smooth.

app.js in the verticalhome app should be updated from:

window.scrollTo(0, 0, {behavior: 'smooth'});


window.scrollTo({left: 0, top: 0, behavior: 'smooth'});

I believe this is the only instance of using the CSSOM-View smooth scrolling DOM methods prior to the updated CSSOM-View specification.
Flags: needinfo?(kgilbert)
Thanks for the quick reply Kip! This seems like an easy fix, so I'll go ahead and make the updates now.
Assignee: nobody → kgrandon
Whiteboard: [systemsfe]
It seems to work fine and is quite simple. R=me to save people time on review cycles since people are busy fixing blockers.
Attachment #8512880 - Flags: review+
In master:
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S8 (7Nov)
You need to log in before you can comment on or make changes to this bug.