Closed Bug 637675 Opened 13 years ago Closed 11 years ago

Use currently selected search engine in search bar for searches in the location bar

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 23

People

(Reporter: dan.smith, Assigned: mikedeboer)

References

Details

(Whiteboard: [fixed in bug 738818])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b12) Gecko/20100101 Firefox/4.0b12

If you assign another search provider as your default Search Engine, searches made directly from the location bar default to Google.  For example: I've removed all of the default Search Engines from Firefox, leaving only Bing.  When I type a search into the Location Bar (not the search bar), the results default to Google.

Reproducible: Always

Steps to Reproduce:
1. Assign Bing as the default Search Engine.
2. Perform a search from the URL/Location Bar (not the search box).
3. Results are displayed from Google.
Actual Results:  
Search results appear from Google, not the assigned Search Engine (Bing).

Expected Results:  
Searches from the URL/Location Bar should be returned from the currently configured search engine.  In this case Bing is the current default search engine, so search results should be from that provider.
I don't know if this is intended, but this is the way it's worked since the beginning. Changing the default search engine in the box on the top right doesn't change where the search goes from the URL bar. CC'ing kev for clarification.

It seems like the behavior is inconsistent and its should work as the reporter suggests.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #0)
> Steps to Reproduce:
> 1. Assign Bing as the default Search Engine.
How did you do this (exact steps)?
1. From the search box at the top right of the Firefox window, you can "Manage Search Engine List".
2. Remove all default search engines, leaving only "Bing".
3. Attempt to search from the URL bar (NOT the search box) and you will get results from Google rather than Bing. 
...I've attached a PNG screenshot.
To have us use Bing for location bar searches, you have two options:
a) set browser.search.defaultenginename to "Bing" using about:config
b) set keyword.URL to Bing's search URL (e.g. http://www.bing.com/search?form=MOZSBR&q= ) using about:config.

Option a) also affects the selected-text context menu searches, the behavior of firefox.exe -search, and other things I may be forgetting. Option b) only impacts the location bar "search" behavior specifically, and is less future-proof (e.g. should the Bing search URL change in the future for whatever reason).
(In reply to comment #5)
It should also be noted that if you go with (a), you need to make sure that keyword.URL has no value set.
This would be best solved by fixing bug 223950

I doubt many people scour the web for a solution when they come across this dumbfounding problem. And then those who find out about about:config are faced with the big scary warning that deters them from modifying anything. Even if they decide to go ahead, they still need to know the correct preference names and values.

Every other browser lets you configure the address bar search engine in their equivalent of the Manage Search Engines window. Why not Firefox? Is it that hard to put a "Use in location bar" checkbox in there? It looks an awful lot like an effort to lock users into Google.
It seems that an easy way to solve the issue would be to set the keyword.URL to the url that is used for the search engine the user sets at the top of the search engines.
Yesterday, I tried to change the search engine of the location bar for my brother and that's the first thing I tried. It failed and I have found 2 ways to do it:
1) http://chillburn.com.au/blog/changing-the-default-search-engine-for-firefox-4-awesomebar/
2) http://www.addictivetips.com/internet-tips/easily-change-the-default-search-engine-in-the-awesome-bar-firefox/

It seems that defaulting to the engine the user chose at the top of engines would be more straightforward. How hard would it be to implement this?
I think the behaviour suggested in comment 9 is most useful. I am using a Japanese build of Firefox in Japan but I generally have my default search set to Google Australia since it gives more useful results when searching for work-related content (Japanese translations of Web specs and tutorials including MDN content are often out of date or very sparse). My workflow looks like this:

1. Type keywords in awesome bar
2. The page I'm looking for doesn't appear
3. Hit Enter to search
4. Only Japanese results appear
5. Go to search box and type the same query again
6. Hit Enter
7. Get English results

Occasionally I switch the search to regular Google when I only want Japanese results. The location bar search should update to match. It should not be necessary to manually tweak another setting to keep the two white boxes in sync.

(Ultimately, of course, it would be best to get rid of the search box altogether and always search from the location bar but that's a separate bug.)
Gavin, would a patch that simply updates keyword.url when ever browser.search.selectedEngine changes be accepted?
No, I don't think we'd want a hack like that. Changing nsDefaultURIFixup::KeywordToURI to use the current engine rather than the default engine would be easy enough, but I don't think we actually want to tie the keyword engine to the search bar's selected engine. Rather, I think we want to introduce the concept of a user-settable "default engine", and have keyword fixup use that.
OS: Windows 7 → All
Hardware: x86 → All
Summary: Searches from the Location Bar default to Google regardless of the currently configured Search Engine for the browser. → Use currently selected search engine in search bar for searches in the location bar
Assignee: nobody → mdeboer
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in bug 738818]
Target Milestone: --- → Firefox 23
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: