Closed
Bug 783275
Opened 12 years ago
Closed 9 years ago
browser.search.selectedEngine value does not change if user just deletes the current Search Engine
Categories
(Firefox :: Search, defect)
Firefox
Search
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: nikolas.markantonis, Unassigned)
Details
Attachments
(2 files, 1 obsolete file)
56.32 KB,
image/jpeg
|
Details | |
1.05 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1 Build ID: 20120713134347 Steps to reproduce: - Navigate to about:config - Accept to be careful - On the search field type browser.search.selectedEngine - A. Change search engine from the tool on the top right - B. Click on manage Search Engines, select the current one and delete. Click ok Actual results: A. Property value changes correctly. B. Search engine is changed, however browser.search.selectedEngine value remains the same. Expected results: Both Search engine and property´s value should change.
Reporter | ||
Updated•12 years ago
|
Component: Untriaged → Search
Comment 1•12 years ago
|
||
Confirmed Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17 Firefox/17.0a1 ID:20120816030539
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
Version: 14 Branch → Trunk
Comment 2•12 years ago
|
||
Since the default search engine would be displayed in the search box and everything works fine after deleting the selected engine, I don't actually see an issue. If user changes the engine again, the preference would be set correctly again.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Reporter | ||
Comment 3•12 years ago
|
||
The issue might not affect directly ffx users, but it affects programs that "detect" ffx default search engine by reading that value..
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Comment 4•12 years ago
|
||
For add-ons to detect the currently selected search engine, I think they should use nsIBrowserSearchService (https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService) instead of depending on the preferences.
Comment 5•12 years ago
|
||
I generally agree with Raymond, but it's also not very hard to change the selectedEngine setter's behavior to always set the pref, so it might not hurt to change it to do that (that's assuming that most uses of the pref from third-party code isn't malicious, which may be an incorrect assumption :().
Comment 6•12 years ago
|
||
Attachment #668554 -
Flags: review?(ttaubert)
Comment 7•12 years ago
|
||
Comment on attachment 668554 [details] [diff] [review] v1 Shouldn't you compare engineToRemove with this._currentEngine before removing it, and clear the pref if they're the same?
Attachment #668554 -
Flags: review?(ttaubert) → review-
Comment 8•12 years ago
|
||
Yes, whenever setting this._currentEngine = null, it would use the default engine and the selectedEngine pref should be clear.
Attachment #668554 -
Attachment is obsolete: true
Attachment #669043 -
Flags: review?(gavin.sharp)
Comment 9•12 years ago
|
||
Comment on attachment 669043 [details] [diff] [review] v2 Thanks! It would be really nice to have a test for this behavior, I think it should be relatively easy to add an xpcshell test next to the existing ones.
Attachment #669043 -
Flags: review?(gavin.sharp) → review+
Comment 10•9 years ago
|
||
Given this as received no activity in almost 3 years, I suspect the use case here isn't really important. There have also been several changes to the way default engine selection is saved in the meantime.
Status: REOPENED → RESOLVED
Closed: 12 years ago → 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•