Closed Bug 1612390 Opened 4 years ago Closed 3 years ago

extension.getViews doesn't contain sidebars when windowId is specified

Categories

(WebExtensions :: General, defect, P3)

72 Branch
defect

Tracking

(firefox72 wontfix, firefox73 wontfix, firefox74 wontfix, firefox91 wontfix, firefox92 wontfix, firefox93 fixed)

RESOLVED FIXED
93 Branch
Tracking Status
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- wontfix
firefox91 --- wontfix
firefox92 --- wontfix
firefox93 --- fixed

People

(Reporter: danny0838, Assigned: zombie)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

  1. Download, unzip, and install the test extension.
  2. Click on the sidebarAction.
  3. Open the extension debug console.

Actual results:

getViews({}) returns an array containing the background page, the browserAction window, the tabbed extension page window, and the sidebar window.

getViews({windowId}) returns an array containing the browserAction window, and the tabbed extension page window. IT DOES NOT CONTAIN THE SIDEBAR WINDOW.

Expected results:

getViews({windowId}) should return an array containing the the sidebar window.

Component: Untriaged → General
Product: Firefox → WebExtensions

Hello,
I have managed to reproduce the issue on the latest Nightly (74.0a1/20200203085242), Beta (73.0b11/20200128001646) and Release (72.0.2/20200117190643) under Windows 10 Pro 64-bit and macOS Catalina 10.15.
The getViews({windowId}) does not contain the sidebar window.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

Fixing this in bug 1708243 part 1.

Assignee: nobody → tomica

https://hg.mozilla.org/mozilla-central/rev/2f684ad43258

Needs an entry for the release notes of 93 at https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/93#changes_for_add-on_developers
And a notice that extension content in sidebars were not returned when windowId is set prior to Firefox 93.

A browser-compat-table entry is likely not needed since sidebar is only supported by Firefox (and Opera?).

Status: NEW → RESOLVED
Closed: 3 years ago
Depends on: 1708243
Keywords: dev-doc-needed
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Will this fix be populated to older versions? Should a note be added to MDN (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension/getViews) saying that it won't work as expected in older Firefox versions?

(In reply to Danny Lin from comment #4)

Will this fix be populated to older versions?

The fix landed in 93 and won't be backported to older Firefox versions.

Should a note be added to MDN (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension/getViews) saying that it won't work as expected in older Firefox versions?

Yes. This is what I meant by

And a notice that extension content in sidebars were not returned when windowId is set prior to Firefox 93.

Documentation changes are in Sidebars included in extension.getViews when windowId specified #8399 .

With regard to:

A browser-compat-table entry is likely not needed since sidebar is only supported by Firefox (and Opera?).

I note that the browser compatibility table includes a Firefox-specific note with regard to behavior in private windows, therefore, it would not seem inappropriate to include details of this too.

Flags: needinfo?(rob)

(In reply to Richard Bloor from comment #6)

Documentation changes are in Sidebars included in extension.getViews when windowId specified #8399 .

With regard to:

A browser-compat-table entry is likely not needed since sidebar is only supported by Firefox (and Opera?).

I note that the browser compatibility table includes a Firefox-specific note with regard to behavior in private windows, therefore, it would not seem inappropriate to include details of this too.

Ok, go ahead and add an entry for the windowId property and add this as a note.
And mark windowId in Firefox for Android as partial support: the property is recognized, but the filter doesn't work.

Flags: needinfo?(rob)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: