Closed Bug 1884146 Opened 2 years ago Closed 2 years ago

Cross containers switch-to-tab artifacts on the address bar dropdown

Categories

(Firefox :: Address Bar, defect)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
125 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox123 --- unaffected
firefox124 --- disabled
firefox125 --- verified

People

(Reporter: phorea, Assigned: mak)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sng])

Attachments

(5 files)

Attached image bookmarks-tabs.png

Notes

  • So far we encounter this issue with (at least) 3 different scenarios, but since the Browser Console error is the same, we will only log this bug.

Found in

  • Firefox Nightly 125.0a1;

Affected versions

  • Firefox 124beta8 (using Firefox Multi-Account Containers add-on)
  • Firefox Nightly 125.0a1;

Affected platforms

  • Windows 10;
  • Ubuntu 22;
  • macOS 12;

Unaffected platforms

  • N/A;

Preconditions

  • browser.urlbar.switchTabs.searchAllContainers set to true

Steps to reproduce

  1. Launch Firefox with the profile from preconditions.
  2. Open several websites in different container tabs (Personal, Work, Banking, Shopping).
  3. Select Bookmarks and then Tabs from This time, search with address bar section.
  4. (intermittent) Start typing a domain name for a switch-to-tab container.
  5. (intermittent) Open bugzilla.mozilla.org in every default container and also add it as an open search engine
  6. Type "bugzilla.mozilla" in the address bar.

Expected result
3. Tabs search mode displays only open tabs results.
4. First result from the address bar dropdown is correctly displayed.
6. Firefox Suggest result is correctly displayed

Actual result
3. Bookmarks and Tabs results are mingled, there is an artifact reduced switch-to-tab container icon.
4. Visit has the container color, please see "visit.png" attachment.
6. Firefox Suggest also shows the reduced switch-to-tab container icon, please see the "open search" attachment.

Browser Console error

  • TypeError: actionNode.querySelector(...) is null - UrlbarController.sys.mjs:701:19

Regression range

  • Not a regression.
Attached image visit.png
Attached image open search.png

(In reply to Petruta Horea [:phorea], Desktop QA from comment #0)

Browser Console error

  • TypeError: actionNode.querySelector(...) is null - UrlbarController.sys.mjs:701:19

I'm fixing this in bug 1883845, I wonder if that will suffice as it's an error breaking the view update code.

Depends on: 1883845

Could you please check if this is still an issue? The steps are complex and I fear I may no exactly reproduce them.

Flags: needinfo?(phorea)
Attached image glitch.png

This issue is partially reproducible after bug 1883845 landed.
The first scenario from description no longer occurs, but there are a few other cases where we saw it, intermittent as well. This time, there are no browser console errors.

Steps:

  1. Have a few websites opened in different containers.
  2. Open Bookmarks search mode.
  3. Exit Bookmarks searchmode, open a new tab and write the first few letters of a website opened in a container tab.
  4. In case the url autofills, delete some letters from it.

The glitch is no longer displayed after focusing/un-focusing the address bar.

Once hit, the glitch also occurs for normal suggestions or visit results. Please check the 3 cases from the attachment.

Flags: needinfo?(phorea)

This may happen if a result is first returned as a switch-tab container result, and then reused as another type of result.
Then we end up persisting the "urlbarView-userContext" and "identity-color-blue" classes, and the tooltiptext="personal" attributes.

My steps to reproduce:

  1. have some top sites open in containers
  2. in a new tab open the urlbar, ensure the first result is a switch to container (e.g. wikipedia)
  3. type beginning of another container tab url (e.g. fa for facebook)
  4. clear autofill if it happens

I think this is less problematic than the other case, as everything should be working normally here, it's just a styling problem.

Assignee: nobody → mak
Status: NEW → ASSIGNED

The heuristic result is always kept first when receiving new results, that means
any result could be upgraded to be a heuristic result, including the first Top
Site, as in the zero prefix case there's no heuritic.
Thus, we must generate new DOM when upgrading between heuristic and non-heuristic.

Then, switch-tab results with container info should only be reusable by other
switch-tab results, otherwise the DOM will be bogus.

Unfortunately these changes are mostly visual and not easily testable (it's
technically feasible but very time consuming).

In general, for the long term, reusing the DOM of results is fragile and causes
DOM, attributes or classes to be ported over to incompatible results. We do it
to avoid flicker but we must investigate better ways to do it.

Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/03471c8cbd1d Cross containers switch-tab artifacts remain on other address bar results. r=jteow
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch

Verified as fixed during Beta 125 preliminary testing of Cross containers tab search in address bar. No artifacts were seen across OSs (Win 11, Mac 13, Ubuntu 22).

Status: RESOLVED → VERIFIED
See Also: → 1951649
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: