Newly created window gets focus even if property focused is set to false

I’m using Firefox Developer Edition 130.0b5 (64-bit) and don’t understand why the following code makes the newly created window have focus:

        if (logToConsole) console.log(`Make new tab or window active: ${contextsearch_makeNewTabOrWindowActive}`);
        await browser.windows.create({
            titlePreface: windowTitle + "'" + selection + "'",
            focused: contextsearch_makeNewTabOrWindowActive,
            url: url,
            incognito: contextsearch_privateMode
        });

The console log returns false.

Looks like a bug, and I can’t find it in the bugzilla, so it’s best to report it there.

I’ve tested it in Chrome where it works.
Also the documentation says it should work:

But from what I can remember, it newer worked, not even in Chrome. But that was many years ago… I remember writing a workaround where I had to re-focus the original window after creating a new one.

You can also create a minimized window.

Hi Juraj, it also looks like a bug to me but I haven’t had a good experience reporting bugs on Bugzilla, so I’ll leave it there.

Hello Olivier,
I know what you mean :smiley:, sometimes I spend 1h writing a bugreport only to see it gets closed as duplicate of some 12 years old bug that will never get fixed :smiley:.

Or even better, it receives like P4 priority :slight_smile:.

Pretty demotivating indeed…

1 Like

Hi Juraj,

You’re spot on and I have found that some devs on Bugzilla think very highly of themselves and don’t seem keen to lend a helping hand. It’s a bit sad because the community makes some effort for Firefox to be as great as it could be.

Anyway, we don’t live in a perfect world, I guess!

Thanks again for your kind help.
Cheers

1 Like

The focused: false option is not supported: https://bugzilla.mozilla.org/show_bug.cgi?id=1253129

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/windows/create#browser_compatibility lists the option as ignored when selecting the corresponding cell for Firefox.

1 Like

Thanks for the info!
I see my bugzilla searching skills are still poor :frowning: and if indeed reported it, it would be closed as duplicate of a 9 years old bug :smiley:.

Is there an easy way to search also closed bugs?

UPDATE:
I’ve managed to create a “better” search query that does search also closed bugs and even sorts them by the last update, but it generates a ton of results :smiley:.

https://bugzilla.mozilla.org/buglist.cgi?query_format=specific&order=Last%20Updated&bug_status=__all__&comments=0&list_id=17172415&content=%s

(replace %s at the end with the words to search)