-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Open
Copy link
Labels
36-x-y37-x-y38-x-ybug 🪲component/BrowserWindowhas-repro-gistIssue can be reproduced with code at https://gist.github.com/Issue can be reproduced with code at https://gist.github.com/platform/windows
Description
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 a bug report that matches the one I want to file, without success.
Electron Version
37.2.1
What operating system(s) are you using?
Windows
Operating System Version
Windows 11
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
No response
Does the issue also appear in Chromium / Google Chrome?
Yes
Expected Behavior
Calling BrowserWindow.focus()
should return false
for BrowserWindow.isFocused()
if the window actually did not receive focus and is not in foreground.
Actual Behavior
BrowserWindow.isFocused()
returns true
even if the window is not in foreground and focused after calling BrowserWindow.focus()
.
Testcase Gist URL
https://gist.github.com/mads6655/b68074cd8e0326a5edc0b2b80ce0b2e8
Additional Information
Run above gist and quickly focus another app, then wait for 5 seconds and observe the console output.
Metadata
Metadata
Assignees
Labels
36-x-y37-x-y38-x-ybug 🪲component/BrowserWindowhas-repro-gistIssue can be reproduced with code at https://gist.github.com/Issue can be reproduced with code at https://gist.github.com/platform/windows