Skip to content

[Bug]: maximize and unmaximize events don't fire for browserwindow #28699

@Jelmerro

Description

@Jelmerro

Preflight Checklist

Electron Version

12.0.4

What operating system are you using?

Other Linux

Operating System Version

Fedora

What arch are you using?

x64

Last Known Working Electron version

11.4.3

Expected Behavior

Events should fire for maximizing or unmaximizing a browserwindow.

Actual Behavior

They don't, since the V12 release. It works fine in Electron 11 and below. See the fiddle console, it should log max and unmax when you toggle the maximization state, but it doesn't in Electron 12. One weird thing is, that when you maximize the window, and then go to fullscreen, it will emit max, but even when leaving fullscreen or unmaximizing the window, you will never see unmax. Not that fullscreen should have anything to do with the maximize event, but I noticed it does, so I thought I would mention that. You can see in the screenshot below that it only logs max (after going fullscreen), which shouldn't be possible if the events would fire correctly, as it should alternate max, unmax, max etc.
image
And this is what happens in Electron 11.4.3:
image
When not entering fullscreen in V12, the logs remains empty, the ONLY way to make it trigger the max event is by maximizing and then going fullscreen, but it never triggers unmax.

Testcase Gist URL

https://gist.github.com/Jelmerro/5a5a8b0cfcf69a24993b47bd7526d242

Metadata

Metadata

Assignees

Labels

12-x-ybug 🪲has-repro-gistIssue can be reproduced with code at https://gist.github.com/platform/linuxstatus/confirmedA maintainer reproduced the bug or agreed with the feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions