Browser.windows.create({type:'popup'}) unable to maximize

Hi there! I am currently in the process of porting my Chrome extension over to Firefox. However, during this process, I noticed that the behavior for windows created by my extension via:

browser.windows.create({type:‘popup’}) are unable to maximize via the square in the top right corner of my screen. Is there an issue with how I am porting my extension? Or is there something else that needs to be done in order to allow windows with type=‘popup’ to maximize?

On a side note, is there a timeline for when browser.windows.onBoundsUpdated will be available for Firefox?

Thanks!

I guess someone decided that maximizing a popup window makes no sense, which is kind of true… I mean, what kind of popup takes the whole screen?

But you can resize the window to match the screen size which you can get from screen object:

Regarding onBoundsUpdated, I’ve tried to look it up at bugzilla but:
image
So I wouldn’t hold my breath :slight_smile:.

Also, what does it do? I can’t find any documentation for this function…
Maybe you could use a MutationObserver instead?

The popup is used to create a borderless window that makes sense for the context of the extension (https://www.tenami.tv/ if you would like to check it out for Chrome).

One thing I have noticed by playing around with the Mozilla api is that, although I cannot click the “maximize” button or “drag” it to the top of my screen, I am still able to maximize the popup window via browser.windows.update(WINDOW_ID, {state: ‘maximized’}).

Thus, the behavior surrounded around maximizing a “popup” (i.e. borderless) window is inconsistent and therefore should be fixed. The expected behavior works perfectly fine in Chrome with no issues, and it makes no sense to be able to maximize

To me this indicates an inconsistency with the Mozilla API that is blocking users from maximizing “popup” or “borderless” windows via the square in the top right of my browser. Is there is a way to properly enable this? This behavior works perfectly fine in Chrome, and I don’t see a reason why it shouldn’t be enabled on Firefox as well.

Apologies with the windows.onBoundsUpdated - what I meant was windows.onBoundsChanged from Chrome*

Which operating system are you on?

I’m using Manjaro Linux with XFCE, and if I run this code in a Firefox extension:

var creating = browser.windows.create({
	type: "popup",
	width: 500,
	height: 500
});

it creates this:

It’s a “window without any of the normal browser UI (address bar, toolbar, etc.).”
but it’s not borderless.
I can maximize, minimize, move and resize it.
“popup”, “panel” and “detached_panel” create the same type of window.
Only “normal” creates something different: a regular Firefox browser window.

I am using Windows 10. You have the behavior that I do want. What happens when you add a URL into the browser.windows.create as well? I tested on both the stable version and nightly version of Firefox, and the issue is present in both situations:

With Firefox 97.0.1 (64-Bit) and “web-ext run”


You can still maximize, minimize, move and resize the popup.

With Firefox Developer 98.0b1 (64-Bit) and about:debugging


You can also maximize, minimize, move and resize the popup.

I need to try this on Windows 10.