New Tabs UI closes tab instead of scrolling

VERIFIED FIXED in Firefox 15

Status

()

Firefox for Android
General
VERIFIED FIXED
6 years ago
2 years ago

People

(Reporter: akeybl, Assigned: wesj)

Tracking

14 Branch
Firefox 16
Points:
---

Firefox Tracking Flags

(firefox15+ verified, firefox16+ verified)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
STR:
1. open up a few tabs (5 or so, but occurs with less)
2. open up the tabs UI
4. put your finger down on a tab, and quickly swipe up and a bit to the right

Expected:
Scroll down to the bottom of the list quickly.

What actually happened:
The tab underneath your finger at the beginning of the swipe upwards is swiped off to the right, closing the tab
(Reporter)

Updated

6 years ago
tracking-firefox15: --- → ?
tracking-firefox16: --- → ?

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 764812
(Assignee)

Comment 2

6 years ago
I wouldn't call this a dup. Your complaint in bug 764812 is that you only dragged the tab a little to the side and it closed. The complaint here is that he's scrolling vertically, which should disable closing the tab, but it isn't.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(Reporter)

Updated

6 years ago
tracking-firefox15: ? → +
tracking-firefox16: ? → +
(Assignee)

Comment 3

6 years ago
Created attachment 635000 [details] [diff] [review]
Patch

Most of this is caused by our fling detector. It wasn't paying attention to the fact that flings can be diagonal. I added a few little tweaks as well though to make sure

1.) We don't scroll the list items and the list at the same time and
2.) To give a little more weight to vertical scrolls over horizontal ones.
Assignee: nobody → wjohnston
Attachment #635000 - Flags: review?(mark.finkle)
Comment on attachment 635000 [details] [diff] [review]
Patch


>-                if (Math.abs(distanceX) > Math.abs(distanceY)) {
>+                // check if this scroll is more horizontal than vertical. Weight vertical drags a little higher
>+                // by using a multiplier
>+                if (Math.abs(distanceX) > Math.abs(distanceY)*1.5) {

Add spaces: Math.abs(distanceY) * 1.5
Use a named const for the 1.5: SWIPE_VERTICAL_WEIGHT

>+            // also make sure that the swipe is in a mostly horizontal direction
>+            if (Math.abs(velocityX) > Math.abs(velocityY*1.5) &&

Same
Attachment #635000 - Flags: review?(mark.finkle) → review+
Looks like TabsTray.java gets build with -Werror, which means that the warning this cset introduced was treated as a build error and caused Android opt redness.

The warning/error is:
 https://tbpl.mozilla.org/php/getParsedLog.php?id=12869250&tree=Mozilla-Inbound
{
/builds/slave/m-in-andrd/build/mobile/android/base/TabsTray.java:51: possible loss of precision
found   : double
required: float
    private static final float SWIPE_VERTICAL_WEIGHT = 1.5;
}

Presumably you either need to either declare that as a double, or add an "f" suffix to "1.5f" (if that works in Java like it does in C++)

Comment 8

6 years ago
https://hg.mozilla.org/mozilla-central/rev/859048b45a64
https://hg.mozilla.org/mozilla-central/rev/4913b412caaa
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
(Assignee)

Comment 9

6 years ago
Comment on attachment 635000 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 713450
User impact if declined: accidental tab closing
Testing completed (on m-c, etc.): landed today 6-22
Risk to taking this patch (and alternatives if risky): pretty low risk. mobile only. fixes a bug in a new feature 
String or UUID changes made by this patch: now.
Attachment #635000 - Flags: approval-mozilla-aurora?
(Reporter)

Comment 10

6 years ago
Comment on attachment 635000 [details] [diff] [review]
Patch

[Triage Comment]
I expect our testing to find any regressions here. Approved for Aurora 15.
Attachment #635000 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Updated

6 years ago
status-firefox15: --- → fixed
status-firefox16: --- → fixed

Comment 12

6 years ago
Verified fixed on:
Htc Desire Z (2.3.3)
Using:
Nightly Fennec 16.0a1 (2012-07-10)
Aurora Fennec 15.0a2 (2012-07-10)

The is fixed, the user can scroll the tab-list vertically without closing tabs by mistake.
Status: RESOLVED → VERIFIED
status-firefox15: fixed → verified
status-firefox16: fixed → verified
You need to log in before you can comment on or make changes to this bug.