Closed Bug 1196677 Opened 4 years ago Closed 4 years ago

About:home/newtab (one-click) searches are performed with the hovered mouse item instead of the current string

Categories

(Firefox :: Search, defect, P2)

42 Branch
defect

Tracking

()

RESOLVED FIXED
Firefox 47
Tracking Status
firefox42 --- affected
firefox43 --- affected
firefox47 --- fixed

People

(Reporter: petruta.rasa, Assigned: nhnt11)

References

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

Reproducible with Dev Edition 42.0a2 and Nightly 43.0a1 2015-08-19 across platforms.

Steps to reproduce:
1. Open about:home or about:newtab and start typing in the search text field
2. Place mouse over suggestions and press Enter
3. Check the search results page
4. Return to previous page, type something and place the mouse over a search suggestion then select a one-click search engine to search with
5. Check the search results page

Actual results:
3. 5. The searches are made with the hovered items and the Search text field is not updated.

Expected results:
Hitting Enter or selecting a one-click search engine should perform the search with the current string (not the hovered item).
Before bug 1171344 landed, the Search text field was updated with the hovered text when pressing Enter. 
According to bug 1142334, this behavior was also incorrect.

Screencast: https://drive.google.com/file/d/0B7jBNZBM3mz-bW9GVVRMaElNSDg/view?usp=sharing

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1171344#c65 and #c66.
Priority: -- → P2
Whiteboard: [fxsearch]
Rank: 25
Attached patch PatchSplinter Review
This simply uses the inputbox value for all searches performed with the keyboard. If the suggestion was highlighted using the arrow keys, the inputbox value would have been updated. If it was highlighted with the mouse and then the enter key was pressed, the inputbox value would NOT have been updated, so the original value will be used for the search.

Let me know if I've misunderstood the desired behavior.
Assignee: nobody → nhnt11
Status: NEW → ASSIGNED
Attachment #8711925 - Flags: review?(adw)
Comment on attachment 8711925 [details] [diff] [review]
Patch

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

Sounds good to me.
Attachment #8711925 - Flags: review?(adw) → review+
https://hg.mozilla.org/integration/fx-team/rev/a10be60e15925625be398dda0c8db1c168d7fd8d
Bug 1196677 - Content search: use inputbox value for searches performed with the keyboard. r=adw
https://hg.mozilla.org/mozilla-central/rev/a10be60e1592
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
I have successfully reproduce this bug on firefox nightly 43.0a1 (2015-08-20)
with windows 7 (32 bit)
Mozilla/5.0 (Windows NT 6.1; rv:43.0) Gecko/20100101 Firefox/43.0

I found this fix on latest aurora 47.0a2 (2016-04-19)

Mozilla/5.0 (Windows NT 6.1; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID : 20160419004026

[bugday-20160420]
Flags: qe-verify+
I've reproduced the initial issue on Nightly 43.0a1 (2015-08-19).

I've tested on Windows 7 64bit, Mac OS X 10.9.5 and Ubuntu 13.10 32bit using Firefox 47 Beta 7 (buildID: 20160518173344) and I have the following results: 
- when the suggestion is highlighted with the mouse and then the enter key was pressed, the inputbox value is not updated => the original value is used for the search
- when the suggestion is highlighted with the mouse and then you select a one-click search engine to search with, the search is made with the highlighted/hovered item, not with the original value (steps 4 and 5 from Description) - any thoughts here?
Flags: needinfo?(nhnt11)
Depends on: 1357523
(In reply to Camelia Badau, QA [:cbadau] from comment #6)
> - when the suggestion is highlighted with the mouse and then you select a
> one-click search engine to search with, the search is made with the
> highlighted/hovered item, not with the original value (steps 4 and 5 from
> Description) - any thoughts here?

I can't reproduce this. When I highlight a suggestion with my mouse (inputbox is not updated) and then use option+up/down to select a one-click engine and press enter, a search is performed for the originally typed query (inputbox value).
Flags: needinfo?(nhnt11)
(In reply to Nihanth Subramanya [:nhnt11] from comment #7)
> (In reply to Camelia Badau, QA [:cbadau] from comment #6)
> > - when the suggestion is highlighted with the mouse and then you select a
> > one-click search engine to search with, the search is made with the
> > highlighted/hovered item, not with the original value (steps 4 and 5 from
> > Description) - any thoughts here?
> 
> I can't reproduce this. When I highlight a suggestion with my mouse
> (inputbox is not updated) and then use option+up/down to select a one-click
> engine and press enter, a search is performed for the originally typed query
> (inputbox value).

Quick followup: turns out bug 1357523 is about this exact issue, and the GIF in that bug helped me understand how to reproduce the issue.
You need to log in before you can comment on or make changes to this bug.