Istador / old-search-fixed

Old Search Fixed 3 remembers the search engine selected by setting it as the default engine. Like before Firefox 43.
Mozilla Public License 2.0
0 stars 0 forks source link

Search Bar Icon is missing at browser start #6

Closed Istador closed 6 years ago

Istador commented 6 years ago

When this add-on is installed, and the browser is starting, the add-on exchanges the magnifier icon with an empty icon.

After changing the default search engine, or by disabling and enabling the Icon setting, it is working as intended.


The style for the element after starting the browser contains the following:

background-image: url("");

This indicated that the src attribute of BrowserSearch.searchBar isn't initialized properly yet when the add-on is loaded.

Possible solution: Set the icon again after browser-delayed-startup-finished is triggered (currently the add-on prevents initializing the same window twice, so it is ignored for already initialized windows)

Also: When BrowserSearch.searchBar is empty or it can't find an icon for a search engine otherwise (e.g. Services.search.defaultEngine.iconURI.asciiSpec), the add-on should fallback to the default browser's magnifier icon.