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

[Bug]: ready-to-show sometimes doesn't fire when window.opener is enabled #40273

Open
3 tasks done
pushkin- opened this issue Oct 18, 2023 · 8 comments
Open
3 tasks done
Labels
27-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/

Comments

@pushkin-
Copy link

pushkin- commented Oct 18, 2023

Preflight Checklist

Electron Version

27.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10

What arch are you using?

x64

Last Known Working Electron version

26.0.0

Expected Behavior

I expect that ready-to-show fires when calling window.open.

Actual Behavior

ready-to-show sometimes doesn't fire

Testcase Gist URL

https://gist.github.com/pushkin-/c0f50f8bbdf6cbbe2eeb8cbf2b944686

Additional Information

I'm seeing what appears to be a repeat of this issue which was fixed with this commit.

Looking at the recent code, it's changed quite significantly and ready-to-show is emitted elsewhere now.
There was this PR to consistently emit that event here, which I will assume worked.

There's been some changes nearby that area due to a Chrome update which may or may not contribute to this. https://chromium-review.googlesource.com/c/chromium/src/+/3644598

I confirmed that did-navigate fires and the workaround in the related issue of using did-finish-load instead works since that event fires. But sometimes (not always), ready-to-show never fires.

Enabling window.opener resolves the issue for some reason.

I haven't yet repro'd this in a minimal example unfortunately, but maybe something stands out to you all in the code as being suspect.

@pushkin-
Copy link
Author

looks like I started seeing this as of Electron 26.1.0: https://releases.electronjs.org/release/v26.1.0

@codebytere
Copy link
Member

@pushkin- how are you listening for ready-to-show in conjunction with window.open? Even some kind of simpler gist example will help me investigate even if it's not a totally reliable repro.

@pushkin-
Copy link
Author

pushkin- commented Oct 19, 2023

@codebytere Added this gist. I hook it in the did-create-window handler. I've so far only been able to repro with the specific URL in my gist, but haven't tested with a lot of other websites.

@jkleinsc jkleinsc added has-repro-gist Issue can be reproduced with code at https://gist.github.com/ 27-x-y labels Oct 30, 2023
@ckerr
Copy link
Member

ckerr commented Jan 3, 2024

@pushkin- is this still happening in the Electron 29 alphas?

@pushkin-
Copy link
Author

pushkin- commented Jan 4, 2024

@ckerr the site where I can repro this is down, so I'm not sure. I'll retest when it comes back up.

@electron-issue-triage
Copy link

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!

@pushkin-
Copy link
Author

bump

@githoniel
Copy link

githoniel commented May 29, 2024

still face this issue and relate to zoomFactor in Windows 10

with 4K(3840*2160) screen with 300% system factor

  1. window.webContents.setZoomFactor(0.6) or bigger to get final scale rate >=200%, ready-to-show will not fire
  2. window.webContents.setZoomFactor(0.5) or smaller to get final scale rate <=150%, ready-to-show will not fire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/
Projects
No open projects
Status: 👀 Unsorted Items
Development

No branches or pull requests

6 participants
@ckerr @jkleinsc @codebytere @pushkin- @githoniel and others