Closed Bug 518308 Opened 15 years ago Closed 15 years ago

lockAxis should not lock a direction if we can't scroll it

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
fennec1.0b5

People

(Reporter: vingtetun, Assigned: vingtetun)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch Patch (obsolete) — Splinter Review
In general we disallow horizontal scroll for chrome UI, but lockAxis can lock the direction on the X axis depending how the movement is started.

If there is only one direction scrollable/pannable we should lock the axis in this direction.

Steps to reproduce:
 * launch fennec and go to the awesome screen
 * start a pan by moving on the X axis

Actual results:
 * scroll is locked in the wrong direction

Expected results:
 * we scroll in the only scrollable direction
Attachment #402317 - Flags: review?(combee)
Attachment #402317 - Flags: review?(combee) → review-
Comment on attachment 402317 [details] [diff] [review]
Patch

I like the idea, but we don't need to track both axis.  If we can't scroll one, then locking doesn't matter.  We should just set the "alreadyLocked" flag early with no locked values.
Attached patch Patch v0.2 (obsolete) — Splinter Review
Address comments and use a flag called _unidirectionalLock
Assignee: nobody → 21
Attachment #402317 - Attachment is obsolete: true
Attachment #402476 - Flags: review?(combee)
Attached patch Patch v0.3Splinter Review
Sorry for the spam...

Because alreadyLocked is public I think it's better to not alter the lockAxis prototype and directly set the alreadyLocked attribute.
Attachment #402476 - Attachment is obsolete: true
Attachment #402567 - Flags: review?(combee)
Attachment #402476 - Flags: review?(combee)
Comment on attachment 402567 [details] [diff] [review]
Patch v0.3

I'm happy with this.
Attachment #402567 - Flags: review?(combee) → review+
pushed:
https://hg.mozilla.org/mobile-browser/rev/bf9225e3f671
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → B5
verified with 20091221 1.9.2 nightly on my n900.

I verified a lock on x and y axis as well as the ability to move diagonal and random.  Both during normal mode and zoom mode.
Status: RESOLVED → VERIFIED
Flags: in-litmus?
litmus testcase https://litmus.mozilla.org/show_test.cgi?id=11532 takes care of this bug
Flags: in-litmus? → in-litmus+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: