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

When running headlessly, Electron reports the browser as out of focus #1939

Closed
brian-mann opened this issue Jun 13, 2018 · 1 comment · Fixed by #1962
Closed

When running headlessly, Electron reports the browser as out of focus #1939

brian-mann opened this issue Jun 13, 2018 · 1 comment · Fixed by #1962
Assignees
Labels
type: bug type: unexpected behavior User expected result, but got another
Milestone

Comments

@brian-mann
Copy link
Member

This causes the browser not to fire its native focus and blur events, which then causes the driver to fallback to its own polyfill behaviors (which in essence can cause other issues).

It's always better for the browser to think it's in focus so that it natively fires all of its default events. All we have to do is call win.focusOnWebView() and even though the window is rendered offscreen, it will think it's correctly focused at all times.

@brian-mann
Copy link
Member Author

Released in 3.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug type: unexpected behavior User expected result, but got another
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants