Searchbar placed in Australis Menu doesn't detect search plugins if Menu wasn't opened in the window

RESOLVED FIXED in Firefox 48

Status

()

defect
P5
normal
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: arni2033, Assigned: florian)

Tracking

Trunk
Firefox 48
Points:
---

Firefox Tracking Flags

(firefox46 affected, firefox48 fixed)

Details

(Whiteboard: [fxsearch])

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
>>>   My Info:   Win7_64, Nightly 46, 32bit, ID 20160107030235
STR:
0. Right-click Searchbar, click "Move to Menu"
1. Copy the link to attached "testcase 1"
2.A) Open new window, paste the link copied in Step 1 into Urlbar, press Enter
2.B) Simply Shift+Click link to "testcase 1" to open in in a new window
3. Click Australis Menu button (≡), click magnifier icon in Searchbar
4.A) Open new tab, paste the link copied in Step 1 into Urlbar, press Enter
4.B) Ctrl+Click or Middle-click reload button
5. Click Australis Menu button (≡), click magnifier icon in Searchbar

Result:       
 After Step 3 searchbar haven't detected any search plugins
 After Step 5 searchbar detected all five search providers

Expectations: 
 After Step 3 searchbar should detect all five providers

This looks like a general issue with Menu (see bug 1231465). I believe extensions are also affected.

Comment 1

3 years ago
Hi Arni, The reproduction steps are rather hard to follow =].  I really appreciate all the bugs you do file.  Is there any chance you could screen shot (if it's clear in one photo what the issue is) or video if you only see with multiple steps?
Flags: needinfo?(arni2033)
Priority: -- → P5
Whiteboard: [fxsearch]
(Reporter)

Comment 2

3 years ago
(In reply to :shell escalante from comment #1)
Yes, I recently discovered that most of my STR are too complicated.

STR_1_simplified:
1. Move Searchbar to Australis Menu (≡)
2. Shift-click this link:  attachment 8706028 [details]  (to open it in a new window)
3. Open Australis Menu in that window

AR:  Searchbar hasn't detected search engines: no green "Plus" button
ER:  Searchbar should detect all 5 search enhines
> https://dl.dropboxusercontent.com/s/metgy8zl0zgr4jr/bug%201238286%20comment%202.webm?dl=0
Flags: needinfo?(arni2033)
(Assignee)

Comment 3

3 years ago
Posted patch PatchSplinter Review
- removing the !searchBar.textbox test in updateOpenSearchBadge is just dead code removal. Before http://hg.mozilla.org/mozilla-central/diff/d808114269ad/browser/base/content/browser.js#l1.26 it was a test for searchBar.searchButton, which historically made sense (http://hg.mozilla.org/mozilla-central/rev/7fe80c3c0f1c#l1.34) but has been useless for a while, as setting DOM attributes on the node before the binding is attached is harmless.

- the removed !this.searchBar check in addEngine is to ensure gBrowser.selectedBrowser.engines is populated even when no searchbar exists in the document yet (when the searchbar is in the Australis menu, the searchbar element is only created at the time the menu is first opened).

- the actual fix is calling BrowserSearch.updateOpenSearchBadge from the constructor of the searchbar binding (this makes the (+) badge appear when the Australis menu is first opened, or when the searchbar is moved from the menu back to the toolbar, without waiting for another page load). This depends on gBrowser.selectedBrowser.engines being correctly populated.
Assignee: nobody → florian
Status: NEW → ASSIGNED
Attachment #8739474 - Flags: review?(adw)

Updated

3 years ago
Attachment #8739474 - Flags: review?(adw) → review+
(Assignee)

Comment 4

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/1d5b01d01df634f2113a6ebfd597feb8b70f001f
Bug 1238286 - Searchbar placed in Australis Menu doesn't detect search plugins if Menu wasn't opened in the window, r=adw.
(Assignee)

Comment 8

3 years ago
https://hg.mozilla.org/integration/fx-team/rev/82517993e1ccf54ad179e21b35553f7c7e31be5f
Bug 1238286 - Searchbar placed in Australis Menu doesn't detect search plugins if Menu wasn't opened in the window, r=adw.
(Assignee)

Updated

3 years ago
Flags: needinfo?(florian)

Comment 9

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/82517993e1cc
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
QA Whiteboard: [g
QA Whiteboard: [g → [good first verify]
(Reporter)

Updated

2 years ago
See Also: → 1327877
You need to log in before you can comment on or make changes to this bug.