Skip to content
Snippets Groups Projects
Unverified Commit 9f66268f authored by trop[bot]'s avatar trop[bot] Committed by GitHub
Browse files

fix: make BrowserWindow#isFocused() return false when blur() is called on macOS (#34031)

The isFocused() method on macOS works by checking if the selected
BrowserWindow is a key window. Unfortunately, this didn't work well
with blur() because it wasn't calling any macOS APIs that would change
the key status of the window. Hence, this changes the implementation of
blur() to call orderOut first, which removes the key
status of the window. Then when the orderBack function is called, it
moves the window to the back of its level in the screen list, without
changing the key window.

Fixes: https://github.com/electron/electron/issues/33732


Signed-off-by: default avatarDarshan Sen <raisinten@gmail.com>

Co-authored-by: default avatarDarshan Sen <raisinten@gmail.com>
parent 577b2ba4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment