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]: document.hasFocus() returns true for all windows opened on startup #28897

Closed
3 tasks done
bpasero opened this issue Apr 28, 2021 · 1 comment · Fixed by #29204
Closed
3 tasks done

[Bug]: document.hasFocus() returns true for all windows opened on startup #28897

bpasero opened this issue Apr 28, 2021 · 1 comment · Fixed by #29204

Comments

@bpasero
Copy link
Contributor

bpasero commented Apr 28, 2021

Preflight Checklist

Electron Version

12.0.5

What operating system are you using?

macOS

Operating System Version

11.2.3

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

document.hasFocus() is only true for the window that has focus.

Actual Behavior

Ever window reports document.hasFocus() to be true right after opening.

Testcase Gist URL

https://gist.github.com/16e6fc829febd0cab115dfd0850a31be

Additional Information

No response

@deepak1556
Copy link
Member

It is a side-effect of #25292, where we put the webContents to focus after load url if it was not hidden on creation.

@mlaurencin mlaurencin added this to Unsorted Issues in 13-x-y Apr 28, 2021
@MarshallOfSound MarshallOfSound moved this from Unsorted Issues to Blocks Stable in 13-x-y Apr 28, 2021
@sofianguy sofianguy moved this from Blocks Stable to Fixed for Next Release in 13-x-y May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
13-x-y
Fixed for Next Release
Development

Successfully merging a pull request may close this issue.

2 participants