Closed Bug 764812 Opened 12 years ago Closed 12 years ago

Too easy to close tabs by swipe


(Firefox for Android Graveyard :: General, defect)

Not set


(firefox15+ verified, firefox16+ verified)

Firefox 16
Tracking Status
firefox15 + verified
firefox16 + verified


(Reporter: aaronmt, Assigned: wesj)




(1 file)

Maybe it's just me, but I'm finding it a little too easy to close tabs by swiping by simply dragging the thumbnail not so far off screen. Perhaps this should be reduced (since we dont currently have undo-tab)?

Adding Madhava/Ian for thoughts here.

Testing on inbound:

Samsung Galaxy Nexus (Android 4.0.4)
Blocks: tab-slide
Wes is this fixed by your velocity calculation changes?
Attached patch PatchSplinter Review
This adjusts our kill edge so that we only delete if the touch is on the left or right side of the tab from where it started.

I also talked to madhava about "fading" the row when the user enters the area where it will be deleted. Working on that. Probably fine for a separate bug.
Assignee: nobody → wjohnston
Attachment #635057 - Flags: review?(mark.finkle)
(In reply to Wesley Johnston (:wesj) from comment #3)

> I also talked to madhava about "fading" the row when the user enters the
> area where it will be deleted. Working on that. Probably fine for a separate
> bug.

Yes please. New bug.
filed bug 766710
Comment on attachment 635057 [details] [diff] [review]

>                 if (dir == DragDirection.HORIZONTAL) {
>                     int finalPos = 0;

nit: remove this blank line

>+                    if ((start.x > mList.getWidth()/2 && e.getX() < mList.getWidth()/4)) {

Add spaces around operators

>+                    } else if (start.x < mList.getWidth()/2 && e.getX() > mList.getWidth()*3/4) {

Add spaces around operators

Also, this worries me:  mList.getWidth()*3/4

Would operator precedence and rounding make this: mList.getWidth()*0.75  or  mList.getWidth()*1

Can you add parens around the (3 / 4) or just use 0.75? (3 / 4) would make it easier to follow your comment.
Attachment #635057 - Flags: review?(mark.finkle) → review+
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
Comment on attachment 635057 [details] [diff] [review]

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 713450
User impact if declined: Easier to accidentally close tabs
Testing completed (on m-c, etc.): landed mc 6-22
Risk to taking this patch (and alternatives if risky): low. fixes a new feature. just tweaks some constants
String or UUID changes made by this patch: none
Attachment #635057 - Flags: approval-mozilla-aurora?
Attachment #635057 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
If I swipe to the left the tab closes only if more then half of it not in view, but if I swipe to the right the tab still closes way too easy, is this ok? 

Verified on:
- build: Firefox 16.0a1 (2012-07-08) and Firefox 15.0a2 (2012-07-08)
- device: LG Optimus 2x 
- OS: Android 2.2.2
We don't care how much of the tab is in view. The idea here now is to close if your swipe starts on the left half of the tab, and ends on the right 25% of the screen, or vice versa. i.e. you could theoretically close a tab by only moving 25% of it off the screen if you start your drag in the middle of the screen. I'm guessing one of two things is happening when you swipe "right". Either

a.) You're doing the action with your thumb on the hand gripping the phone? In that case maybe in this situation you're moving your thumb towards your palm, starting the swipe in the middle of the screen the middle of the screen and dragging the tab towards the edge. I could see that being "easier" than the other case, moving your thumb away from your palm, maybe its harder to move the tab quite as far?

b.) You're able to move your finger one direction more quickly than the other.
What I see still like a problem is that if you tap in the left side of the tab and swipe to the right only a bit the tab closes and if you tap on the left side of the tab and swipe to the left, the tab closes in the right side. I filed bug 772436 for these and also made video:
Depends on: 772436
Andreea, please verify and add test-cases around this feature.
Flags: in-moztrap?(andreea.pod)
Verified fixed on:
- build: Firefox Beta 15.0 (2012-07-17)
- device: ASUS EEE Transformer (Android 4.0.3), LG Optimus 2X (Android 2.2.2)

Test-cases added in moztrap.
Flags: in-moztrap?(andreea.pod) → in-moztrap+
tracking-fennec: ? → ---
See Also: → 1003782
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.