Open Bug 415424 Opened 12 years ago Updated 4 years ago

Multiple "Add new engine" options in search bar dropdown list if page is reloaded in the background and advertised engine name changes

Categories

(Firefox :: Search, defect, P4, minor)

x86
Windows XP
defect

Tracking

()

People

(Reporter: tabmix.onemen, Unassigned, Mentored)

References

Details

(Whiteboard: [good next bug][fxsearch])

Attachments

(1 file)

Attached image screenshot
Multiple Add "new engine" in Search button drop down list

Reproducible: Always

Steps to Reproduce:
1.load page with search engine, or this page (oo... you are already here )
2.open more tab(s)
3.select one of the other tab
4 reload this tab using tab context menu.
5.repeat step 4.
6.select this tab again.
7.look in Search button drop down list

Actual Results:
Multiple Add "new engine" in Search button drop down list for the same engine

Expected Results:
one Add "new engine" in Search button drop down list for each engine

Reason for this result:
we only do >> gBrowser.mCurrentBrowser.engines = null in  nsBrowserStatusHandler.prototype.startDocumentLoad

maybe we need to add to tabbrowser.xml mTabProgressListener.onStateChange

-                if (aWebProgress.DOMWindow == this.mBrowser.contentWindow)
+                if (aWebProgress.DOMWindow == this.mBrowser.contentWindow) {
                   this.mBrowser.userTypedClear += 2;
+                  if (aRequest)
+                    this.mBrowser.engines = null;
+                }
Good catch! It might just be easier to have BrowserSearch.addEngine only add an engine if it isn't already in the list.
Bug 417143 "fixed" this by not adding multiple entries with the same name. I suppose it could still happen if a page advertises a different engine name each time it loads.
Severity: normal → minor
Summary: Multiple Add "new engine" in Search button dropdown list → Multiple "Add new engine" options in search bar dropdown list if page is reloaded in the background and advertised engine name changes
Duplicate of this bug: 374484
Whiteboard: [mentor=gavin]
I want to slove this bug. Please tell me the procedure.
Abhinav - are you still interested in pursuing this bug?
Whiteboard: [mentor=gavin] → [mentor=gavin][good next bug]
Mentor: gavin.sharp
Whiteboard: [mentor=gavin][good next bug] → [good next bug]
Priority: -- → P4
Whiteboard: [good next bug] → [good next bug][fxsearch]
Rank: 45
You need to log in before you can comment on or make changes to this bug.