Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ready-to-show event is never fired after calling browserWindow.hide() on Windows #24855

Closed
3 tasks done
danny-does-stuff opened this issue Aug 5, 2020 · 2 comments
Closed
3 tasks done

Comments

@danny-does-stuff
Copy link

danny-does-stuff commented Aug 5, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 9.1.2
  • Operating System:
    • Windows 10
  • Last Known Working Electron version:
    • 4.2.8 (Not sure if it was happening from 5 - 8)

Expected Behavior

Calling browserWindow.hide() after creating a new BrowserWindow() on windows should not preclude the ready-to-show event from being fired.

Actual Behavior

In Windows, after creating a BrowserWindow and calling browserWindow.hide(), the ready-to-show event is never fired.

To Reproduce

** ON WINDOWS **

Either use this Electron Fiddle: https://gist.github.com/dannyharding10/7b38139009012817608c0ea8a2ba29bc

Or simply clone the Electron Quick Start repo and make the following changes in main.js

image

Additional Information

This does not happen on Mac. I did not test on Linux. As far as I understand, if the window is showing then the ready-to-show event will never fire, as described in the docs where it says "the ready-to-show event will be emitted when the renderer process has rendered the page for the first time if the window has not been shown yet.". However calling window.hide() does not show the window, so ready-to-show should still fire.

I could imagine how this might be intended behavior if it were consistent between operating systems, but the fact that it is specific to Windows makes me think it is indeed a bug in electron.

@danny-does-stuff danny-does-stuff changed the title ready-to-show event is never fired after calling browserWindow.hide() in Windows ready-to-show event is never fired after calling browserWindow.hide() on Windows Aug 5, 2020
@codebytere
Copy link
Member

Potentially fixed by #25448

@codebytere
Copy link
Member

Confirmed closed in #25448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants