Closed
Bug 732364
Opened 13 years ago
Closed 13 years ago
Scrolling vertically is near impossible after scrolling horizontally in some pages
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox14 verified, firefox15 verified, blocking-fennec1.0 soft)
VERIFIED
FIXED
Firefox 15
People
(Reporter: reuben, Assigned: kats)
References
()
Details
(Whiteboard: [viewport])
Attachments
(2 files)
2.57 KB,
patch
|
cwiiis
:
review+
mfinkle
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
1.96 KB,
patch
|
cwiiis
:
review+
mfinkle
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Samsung Galaxy S2, running CyanogenMod 7.1 and today's Maple nightly build.
STR:
1. Go to https://github.com/travis-ci/travis-hub/blob/master/lib/travis/hub.rb
2. Scroll down the code a bit.
3. Scroll the code to the left.
4. Try to scroll down or up again.
Actual results:
Scrolling vertically is almost impossible after the horizontal scroll.
This may be related to bug 705877.
Expected results:
Smooth scrolling :)
Updated•13 years ago
|
blocking-fennec1.0: --- → ?
status-firefox13:
--- → affected
Comment 1•13 years ago
|
||
You might be hitting our axis locking. Are you lifting your finger after step #3?
Assignee | ||
Comment 3•13 years ago
|
||
I was able to reproduce this on the Galaxy Nexus, and I don't think it's axis locking. The github source viewer has some sort of subdocument that is scrollable, but it isn't behaving like the normal iframe scrolling bugs or expected behaviour. This will need more investigation.
Reporter | ||
Comment 4•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #1)
> You might be hitting our axis locking. Are you lifting your finger after
> step #3?
Sorry, this got lost in bugmail. Yes, I am.
Comment 6•13 years ago
|
||
Just to copy my STR over from the bug I just duped:
Running Nightly on a Motorola Photon phone running Gingerbread.
1) Subscribe to a graphics-heavy feed like joystiq.com on reader.google.com
2) Visit reader.google.com/i on an Android device running Nightly
3) Tap on some feed entries to expand them.
3) Feed entries with wide graphics can be panned from side to side, but the page itself cannot be panned vertically unless I very carefully swipe on what feels like a single pixel gutter on the extreme left or right of the page.
FWIW, I lift my finger plenty of times. It just seems as if the horizontally-scrolling part swallows and ignores all vertical scrolling events altogether.
Assignee | ||
Updated•13 years ago
|
Whiteboard: [viewport]
Comment 8•13 years ago
|
||
This happens in Google Reader all the time. I hear that's a popular web app! ;-)
blocking-fennec1.0: - → ?
Comment 9•13 years ago
|
||
STR: bug 742175 comment 0.
Updated•13 years ago
|
blocking-fennec1.0: ? → soft
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → bugmail.mozilla
status-firefox13:
affected → ---
status-firefox14:
--- → affected
status-firefox15:
--- → affected
Assignee | ||
Comment 10•13 years ago
|
||
A few changes here:
1. the scroll coordinates coming in would sometimes be 1.99234 instead of 2.0, and they would get truncated, so make sure to round them first.
2. _elementCanScroll always checked both axes, even if the user was only scrolling on one axis. This meant that if the horizontal axis was scrollable and the vertical axis was not, and the requested scroll was something like (0, 5), _elementCanScroll would return true even though it was actually impossible to scroll in the direction the user was requesting. The new code only returns true if the axis is scrollable AND there is a nonzero scroll amount on that axis.
Attachment #620332 -
Flags: review?(chrislord.net)
Assignee | ||
Comment 11•13 years ago
|
||
Axis locking was being ignored on subdocument scrolling, so if you had a subdocument that was horizontally scrollable and not vertical scrollable, you basically had to move your finger in a strict vertical line for _elementCanScroll to return false and pan the main document. Applying axis locking fixes this problem because minute horizontal variations are filtered out. Also it makes the behaviour more consistent in general.
Attachment #620334 -
Flags: review?(chrislord.net)
Comment 12•13 years ago
|
||
Comment on attachment 620332 [details] [diff] [review]
(1/2) Fix _elementCanScroll
Review of attachment 620332 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
::: mobile/android/chrome/content/browser.js
@@ +2552,5 @@
> // the user wanted, and neither can any non-root sub-frame, cancel the
> // override so that Java can handle panning the main document.
> let data = JSON.parse(aData);
> + data.x = Math.round(data.x);
> + data.y = Math.round(data.y);
Do we need to round here? A comment about it would be good.
@@ +2821,4 @@
>
> + if (x < 0 && elem.scrollLeft > 0) {
> + scrollX = true;
> + } else if (x > 0 && elem.scrollLeft < (elem.scrollWidth - elem.clientWidth)) {
I think this would still be readable as a single if statement, just putting the clauses in brackets on separate lines.
@@ +2826,5 @@
> }
>
> + if (y < 0 && elem.scrollTop > 0) {
> + scrollY = true;
> + } else if (y > 0 && elem.scrollTop < (elem.scrollHeight - elem.clientHeight)) {
ditto here.
Attachment #620332 -
Flags: review?(chrislord.net) → review+
Comment 13•13 years ago
|
||
Comment on attachment 620334 [details] [diff] [review]
(2/2) Apply axis locking on subdocument scrolling
Review of attachment 620334 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
Attachment #620334 -
Flags: review?(chrislord.net) → review+
Assignee | ||
Comment 14•13 years ago
|
||
Landed with review comments addresed.
https://hg.mozilla.org/mozilla-central/rev/08ea94cb6365
https://hg.mozilla.org/mozilla-central/rev/948a0d72d99f
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
Assignee | ||
Comment 15•13 years ago
|
||
Comment on attachment 620332 [details] [diff] [review]
(1/2) Fix _elementCanScroll
[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: scrolling on iframes/subdocuments behaves poorly when the element is scrollable on both axes
Testing completed (on m-c, etc.): locally, on m-c for a couple of days
Risk to taking this patch (and alternatives if risky): mobile-only, low risk
String changes made by this patch: none
Attachment #620332 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 16•13 years ago
|
||
Comment on attachment 620334 [details] [diff] [review]
(2/2) Apply axis locking on subdocument scrolling
[Approval Request Comment]
same as above
Attachment #620334 -
Flags: approval-mozilla-aurora?
Updated•13 years ago
|
Attachment #620334 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•13 years ago
|
Attachment #620332 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 17•13 years ago
|
||
Comment 18•13 years ago
|
||
FWIW, unless I'm imagining things, it looks like this fix landed in my Aurora on Android after I updated. And, it seems to work great.
No more issues scrolling through Google Reader, so I am a happy camper. Thank you!
Comment 19•13 years ago
|
||
Verified fixed on Nightly 15.0a1 (2012-05-21)
Aurora 14.0a2 (2012-05-21)
Samsung Nexus (4.0.2)
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•