electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

Home Page:https://electronjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: BrowserWindow created between `app.dock.hide()` and `app.dock.show()` is visible on full screen

MaximKalinin opened this issue · comments

Preflight Checklist

Electron Version

19.0.6

What operating system are you using?

macOS

Operating System Version

macOS Monterey 12.4

What arch are you using?

x64

Last Known Working Electron version

12.0.0

Expected Behavior

If you perform steps from Actual Behavior section, the window will appear on one of available desktops, not on top of other fullscreen app.

This is how Electron 12.0.0 and below behaved.

Actual Behavior

The issue is macOS specific since it is related to OS dock.

Before starting the app in the Fiddle (use Electron Fiddle app and link from Testcase Gist URL section), enter fullscreen mode in Electron Fiddle app (real case scenario with packaged app could be reproduced with any full-screen app opened and Electron app being started from the Spotlight).

If you create a hidden BrowserWindow after invoking app.dock.hide, then invoke app.dock.show and then window.show, window will stay always on top of other windows and will be visible on full screen.

Testcase Gist URL

https://gist.github.com/MaximKalinin/cc61c84dc111b7e4fc29a5394b7700ce

Additional Information

No response

I can confirm the issue got introduced with electron v13.0.0 onwards. I couldn't reproduce the behavior on electron v12.2.3 which is the last version released on electron v12.

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.