Closed Bug 849246 Opened 9 years ago Closed 9 years ago
Header doesn't go up if scrolling up then immediately down
1. Enable browser.chrome.dynamictoolbar in about:config in latest nightly. 2. Go to a long page 3. Scroll down 4. Flick finger down to scroll up 5. Quickly flick finger up to scroll down Many times the header is not hidden.
So this will be because I don't use the momentum of the pan to show/hide the toolbar... Perhaps I should look at the velocity on touch-release, will see about doing this.
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
This fixes Jim's issue (I think) by using the velocity of the swipe to determine the direction to scroll the toolbar in when the velocity is faster than the default animation velocity. It's still possible to initiate a fling in the opposite direction of the swipe, but only a very slow one, and in this case, I feel following the fling might actually feel weirder.
Attachment #723938 - Flags: review?(bugmail.mozilla)
Comment on attachment 723938 [details] [diff] [review] Follow the swipe velocity when hiding header Review of attachment 723938 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the fix below ::: mobile/android/base/BrowserToolbar.java @@ +543,5 @@ > + // Work out the default animation velocity. This assumes a linear > + // animation which is incorrect, but the animation is short enough that > + // there's very little difference. > + float defaultVelocity = > + mLayout.getHeight() / (VISIBILITY_ANIMATION_DURATION * (1.0f/60.0f)); This should be mLayout.getHeight() / ((VISIBILITY_ANIMATION_DURATION / 1000) * 60)
Attachment #723938 - Flags: review?(bugmail.mozilla) → review+
Addressed and pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/1343cc74ff21
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
You need to log in before you can comment on or make changes to this bug.