Closed Bug 1800360 Opened 2 years ago Closed 2 years ago

browser.windows.create({ focused: false }) does not open a window in the background

Categories

(WebExtensions :: General, defect)

Firefox 106
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1253129

People

(Reporter: lionelster, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0

Steps to reproduce:

Either:
a) create a webextension that executes the below code, or
b) inspect any running webextension via about:debugging#/runtime/this-firefox and enter in the console the below code:

await browser.windows.create({ focused: false })

Actual results:

A new window opens in focused state. (And the console shows the window object with a focused: true property.)

Expected results:

The new window should have opened in the background, as stated by the documentation:

focused (Optional)
boolean. If true, the new window will be focused. If false, the new window will be opened in the background and the currently focused window will stay focused. Defaults to true.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows/create

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Component: Widget: Cocoa → General
Product: Core → WebExtensions

The Browser compatibility data table already shows that focused: false is not supported.

See Also: → 1253129

Hello,

I tested the latest Nightly (109.0a1/20221114214403), Beta (108.0b1/20221114145411) and Release (106.0.5/20221104133228) under Windows 10 x64 and Ubuntu 16.04 LTS.

When the code is run in the extension console (as per the STR), a new window is opened in a focused state, as mentioned in Comment 0. So the behavior is confirmed.

However, as per Comment 2, this seems to be the expected behavior as focused: false is not supported anymore.

I will not modify the status of the report until further confirmation is provided that this is indeed not a bug, but intended behavior. Thank you !

The Browser compatibility data table already shows that focused: false is not supported.

I completely missed that, sorry. We can resolve as duplicate of Bug 1253129. Reading the thread I gather that it is simply nigh impossible to support?

As per Comment 4, resolving as duplicate of Bug 1253129.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1253129
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.