Closed Bug 909979 Opened 11 years ago Closed 11 years ago

Off-by-one (?) error when long-clicking list items on the search suggestions screen

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox26 verified)

VERIFIED FIXED
Firefox 26
Tracking Status
firefox26 --- verified

People

(Reporter: mcomella, Assigned: Margaret)

References

Details

(Keywords: regression)

Attachments

(1 file)

1) Click the awesomebar
2) Type something with matched results (e.g. go to http://apple.com, click a few links, and search "app") 
3) Long-click on the topmost non-search provider item

Expected: A context menu for the selected link
Actual: A context menu for the link one down

I noticed on my phone this issue does not occur when the search providers have not loaded yet and thus are not present (meaning the Google provider may be offsetting this count by one).

Note that clicking the bottom-most link causes a crash.

Similar bugs: bug 909539 and bug 908423. I wonder if there isn't a root cause to these problems since I don't remember this happening before - I will try to bisect.
tracking-fennec: --- → ?
Keywords: regression
It looks like this may be fixed by Sriram's patch in bug 909539, since that affects all HomeListViews.
I tried with that patch. That didn't fix this issue. Are we adding something to the browser search? Is the suggestions prompt a header?
Summary: Off-by-one (?) error when selecting list items on the search suggestions screen → Off-by-one (?) error when long-clicking list items on the search suggestions screen
Is the problem just when long-clicking or when regular clicking?

For regular clicks, we have this adjustment:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/BrowserSearch.java#233

Probably need to add the same thing for long clicks.
> Is the problem just when long-clicking or when regular clicking?

Just long-clicking (using 8/27's Nightly).
Attached patch quick patchSplinter Review
This fixes the issue, but I don't know if it's the most elegant solution.
Assignee: nobody → margaret.leibovic
Attachment #796798 - Flags: feedback?(sriram)
Comment on attachment 796798 [details] [diff] [review]
quick patch

Review of attachment 796798 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good.
Attachment #796798 - Flags: feedback?(sriram) → feedback+
Comment on attachment 796798 [details] [diff] [review]
quick patch

Upgrading to a review request. I'll get rid of that stray import line that got added to HomeListView.
Attachment #796798 - Flags: review?(sriram)
Comment on attachment 796798 [details] [diff] [review]
quick patch

Review of attachment 796798 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with unused import removed.
Attachment #796798 - Flags: review?(sriram) → review+
https://hg.mozilla.org/mozilla-central/rev/098b935f5f3a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Verified Fixed. Didn't even know we had a context menu on those.
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: