Last Comment Bug 699706 - Scroll open tab into view when the tab list is opened
: Scroll open tab into view when the tab list is opened
Status: VERIFIED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: P3 normal (vote)
: ---
Assigned To: Sriram Ramasubramanian [:sriram]
:
Mentors:
Depends on: 718267
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-03 21:07 PDT by Kevin Brosnan [:kbrosnan]
Modified: 2016-07-29 14:20 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
11+


Attachments
Patch (2.05 KB, patch)
2011-11-08 13:38 PST, Sriram Ramasubramanian [:sriram]
mark.finkle: review+
Details | Diff | Splinter Review

Description Kevin Brosnan [:kbrosnan] 2011-11-03 21:07:42 PDT
When opening the tab bar your current tab is noted by being bold. Clicking on the tab drop down may not display the currently selected tab if you have more than 9 tabs open in portrait mode or 5 tabs in landscape on my g2.
Comment 1 Sriram Ramasubramanian [:sriram] 2011-11-08 13:38:58 PST
Created attachment 572993 [details] [diff] [review]
Patch

The tabs list is scrolled to the selected tab when showed first.
The tabs list still scrolls to top -- which will be fixed as a part of Bug 697098.
Comment 2 Mark Finkle (:mfinkle) (use needinfo?) 2011-11-08 19:55:38 PST
Comment on attachment 572993 [details] [diff] [review]
Patch


>diff --git a/embedding/android/TabsTray.java b/embedding/android/TabsTray.java

>+        public int getSelectedTabPosition() {
>+            if (mTabs == null)
>+                return -1;
>+
>+            return mTabs.indexOf(Tabs.getInstance().getSelectedTab());
>+        }

Let's be a little more generic here:

getPositionForTab(Tab tab) {
    ...
    return mTabs.indexOf(tab);
}

r+ otherwise. I can change on checkin
Comment 3 Mark Finkle (:mfinkle) (use needinfo?) 2011-11-08 20:16:00 PST
https://hg.mozilla.org/projects/birch/rev/64ec37a61326
Comment 4 Camelia Urian 2011-11-09 06:46:59 PST
Build ID: Mozilla/5.0 (Android; Linux armv7l; rv:10.0a1) Gecko/20111108 Firefox/10.0a1 Fennec/10.0a1 - Native Fennec build
Device: HTC Desire Z - Android 2.3

The tabs list is scrolled to the selected tab when showed first., verified in both landscape and portrait.
Comment 5 Wesley Johnston (:wesj) 2011-11-10 10:34:38 PST
These patches were backed while investigating Talos failures.  Now that tests are green again, we will need to reland.
Comment 6 Brad Lassey [:blassey] (use needinfo?) 2011-11-11 09:02:08 PST
backout was backed out https://hg.mozilla.org/projects/birch/rev/6f925b45a547
Comment 7 Camelia Urian 2011-11-15 02:35:48 PST
Build ID: Mozilla/5.0 (Android; Linux armv7l; rv:10.0a1) Gecko/20111114 Firefox/10.0a1 Fennec/10.0a1 - Native Fennec build
Device: HTC Desire Z - Android 2.3

The tabs list is scrolled to the selected tab when showed first., verified in both landscape and portrait.

Note You need to log in before you can comment on or make changes to this bug.