Closed
Bug 909539
Opened 12 years ago
Closed 12 years ago
[TABLET] Tapping on a history item in the new UI brings the next item below the one tapped
Categories
(Firefox for Android Graveyard :: Awesomescreen, defect)
Tracking
(fennec26+)
VERIFIED
FIXED
Firefox 26
| Tracking | Status | |
|---|---|---|
| fennec | 26+ | --- |
People
(Reporter: glandium, Assigned: sriram)
References
Details
Attachments
(2 files)
|
169.72 KB,
image/jpeg
|
Details | |
|
1.43 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
When I tap on bookmarks in the new UI, the right thing is visually selected, but then an entirely different bookmark is opened.
Updated•12 years ago
|
Blocks: new-about-home
Flags: needinfo?(margaret.leibovic)
Comment 1•12 years ago
|
||
I can't reproduce this issue. Do you have more specific STR? Is sync set up? Is it an off-by-one error, or is there no pattern?
In bug 908423, wrote a patch for something that sounds similar, but I can't reproduce the issue here even without that patch applied.
Flags: needinfo?(margaret.leibovic)
| Reporter | ||
Comment 2•12 years ago
|
||
So, in fact, this is not on bookmarks, this is on history. And it's not completely random, I'm just getting the following entry. So if I tap the on above, i get what i want.
Summary: Tapping on a bookmark in the new UI brings an entirely different site → Tapping on a history item in the new UI brings an entirely different site
Comment 3•12 years ago
|
||
Thanks for the details. This probably has to do with the header rows in the history list. I can look into a fix.
Assignee: nobody → margaret.leibovic
tracking-fennec: --- → 26+
Comment 4•12 years ago
|
||
I'm still having trouble reproducing this... is it a specific page in the "History" tab, e.g. "Most visited" or "Most recent"? Would you mind taking a screenshot to show what your list looks like? I'm confused as to how this is happening.
Flags: needinfo?(mh+mozilla)
| Reporter | ||
Comment 5•12 years ago
|
||
It happens on both "Most visited" and "Most recent". The list of "Tabs from last time" is empty so I can't say for that one. If I tap on e.g. the "Index of ftp://ftp.mozilla.org/...", I get to Amazon.co.jp.
Flags: needinfo?(mh+mozilla)
Comment 7•12 years ago
|
||
Ah, I couldn't reproduce on a phone, but I could reproduce on a tablet.
I'm cc'ing Sriram and Shilpan, since they've done more of the work on tablets.
Comment 8•12 years ago
|
||
I added some logging, and I found that on tablets, the position we get on item click is one higher than on phones:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/MostVisitedPage.java#106
Do we have a secret hidden item on tablets that could be causing this problem?
| Assignee | ||
Comment 9•12 years ago
|
||
Shilpan,
Are you hiding anything?
Comment 10•12 years ago
|
||
It looks like we add a header view for tablets, but we're not accounting for that in the item click listener:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/HomeListView.java#66
| Assignee | ||
Comment 11•12 years ago
|
||
Attachment #796359 -
Flags: review?(margaret.leibovic)
Updated•12 years ago
|
Assignee: margaret.leibovic → sriram
Summary: Tapping on a history item in the new UI brings an entirely different site → [TABLET] Tapping on a history item in the new UI brings the next item below the one tapped
Comment 12•12 years ago
|
||
Comment on attachment 796359 [details] [diff] [review]
Patch
Review of attachment 796359 [details] [diff] [review]:
-----------------------------------------------------------------
Does this cause problems with BookmarksListView now, where we're already adjusting for the header rows?
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/BookmarksListView.java#106
I like that you could just centralize this in HomeListView. Before giving an r+, I just want to confirm that the item click listener BookmarksListView still does the right thing with this patch.
::: mobile/android/base/home/HomeListView.java
@@ +100,5 @@
> }
>
> + @Override
> + public void setOnItemClickListener(final AdapterView.OnItemClickListener listener) {
> + super.setOnItemClickListener(new AdapterView.OnItemClickListener() {
Add some comments in here about why we need to be doing this.
@@ +105,5 @@
> + @Override
> + public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
> + if (listener == null) {
> + return;
> + }
If someone calls setOnItemClickListener with a null listener, should we just bail earlier and never set a listener?
| Assignee | ||
Comment 13•12 years ago
|
||
(In reply to :Margaret Leibovic from comment #12)
> Comment on attachment 796359 [details] [diff] [review]
> Patch
>
> Review of attachment 796359 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Does this cause problems with BookmarksListView now, where we're already
> adjusting for the header rows?
> http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/
> BookmarksListView.java#106
>
> I like that you could just centralize this in HomeListView. Before giving an
> r+, I just want to confirm that the item click listener BookmarksListView
> still does the right thing with this patch.
BookmarksListView will not show top divider. Hence this logic won't be used there. The position would remain unchanged. I've tested that part.
>
> ::: mobile/android/base/home/HomeListView.java
> @@ +100,5 @@
> > }
> >
> > + @Override
> > + public void setOnItemClickListener(final AdapterView.OnItemClickListener listener) {
> > + super.setOnItemClickListener(new AdapterView.OnItemClickListener() {
>
> Add some comments in here about why we need to be doing this.
>
> @@ +105,5 @@
> > + @Override
> > + public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
> > + if (listener == null) {
> > + return;
> > + }
>
> If someone calls setOnItemClickListener with a null listener, should we just
> bail earlier and never set a listener?
I thought of doing that. But, even if its null, we need to inform the "super" about it to nullify the listener. Or, we could just do that job ourselves. But again, this code is not being used in multiple places. There is just one call to set the listener when lists are used. They are never made null again. The null check I've added can be removed actually.
Comment 14•12 years ago
|
||
(In reply to Sriram Ramasubramanian [:sriram] from comment #13)
> (In reply to :Margaret Leibovic from comment #12)
> > Comment on attachment 796359 [details] [diff] [review]
> > Patch
> >
> > Review of attachment 796359 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > Does this cause problems with BookmarksListView now, where we're already
> > adjusting for the header rows?
> > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/
> > BookmarksListView.java#106
> >
> > I like that you could just centralize this in HomeListView. Before giving an
> > r+, I just want to confirm that the item click listener BookmarksListView
> > still does the right thing with this patch.
>
> BookmarksListView will not show top divider. Hence this logic won't be used
> there. The position would remain unchanged. I've tested that part.
Sounds good. Hopefully there won't be a bug here if things ever change, though!
> >
> > ::: mobile/android/base/home/HomeListView.java
> > @@ +100,5 @@
> > > }
> > >
> > > + @Override
> > > + public void setOnItemClickListener(final AdapterView.OnItemClickListener listener) {
> > > + super.setOnItemClickListener(new AdapterView.OnItemClickListener() {
> >
> > Add some comments in here about why we need to be doing this.
> >
> > @@ +105,5 @@
> > > + @Override
> > > + public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
> > > + if (listener == null) {
> > > + return;
> > > + }
> >
> > If someone calls setOnItemClickListener with a null listener, should we just
> > bail earlier and never set a listener?
>
> I thought of doing that. But, even if its null, we need to inform the
> "super" about it to nullify the listener. Or, we could just do that job
> ourselves. But again, this code is not being used in multiple places. There
> is just one call to set the listener when lists are used. They are never
> made null again. The null check I've added can be removed actually.
I'm never a big fan of unnecessary null checks, so removing it sounds good.
Comment 15•12 years ago
|
||
Comment on attachment 796359 [details] [diff] [review]
Patch
Review of attachment 796359 [details] [diff] [review]:
-----------------------------------------------------------------
Does this cause problems with BookmarksListView now, where we're already adjusting for the header rows?
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/BookmarksListView.java#106
I like that you could just centralize this in HomeListView. Before giving an r+, I just want to confirm that the item click listener BookmarksListView still does the right thing with this patch.
::: mobile/android/base/home/HomeListView.java
@@ +100,5 @@
> }
>
> + @Override
> + public void setOnItemClickListener(final AdapterView.OnItemClickListener listener) {
> + super.setOnItemClickListener(new AdapterView.OnItemClickListener() {
Add some comments in here about why we need to be doing this.
@@ +105,5 @@
> + @Override
> + public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
> + if (listener == null) {
> + return;
> + }
If someone calls setOnItemClickListener with a null listener, should we just bail earlier and never set a listener?
Attachment #796359 -
Flags: review?(margaret.leibovic) → review+
Comment 16•12 years ago
|
||
Sorry, splinter duplicated all my comments.
| Assignee | ||
Comment 17•12 years ago
|
||
Comment 18•12 years ago
|
||
FYI, this landing ended up touching HwcComposer2D.cpp.
https://hg.mozilla.org/integration/fx-team/annotate/b7df57dc193e/widget/gonk/HwcComposer2D.cpp
I'm guessing you did an hg rebase before pushing? It has some known issues with possibly doing this. Please make sure you are running the latest version, and if you are, avoid rebasing.
Comment 19•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Comment 20•12 years ago
|
||
Verified as fixed on:
Device: Samsung Galaxy Tab(Android 4.0.4)
Build: Nightly 26 (2013-09-04)
Status: RESOLVED → VERIFIED
Updated•4 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
•