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]: BrowserWindow
: isFocused()
returns true
even after calling blur()
on macOS
#33732
Closed
3 tasks done
Labels
Comments
dsanders11
added
platform/macOS
component/BrowserWindow
has-repro-comment
Issue has repro in comments
labels
Apr 12, 2022
RaisinTen
changed the title
[Bug]:
[Bug]: Apr 12, 2022
isFocused()
returns true
even after calling blur()
on macOSBrowserWindow
: isFocused()
returns true
even after calling blur()
on macOS
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 12, 2022
The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
4 tasks
PR: #33734 |
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 12, 2022
The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 12, 2022
The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 12, 2022
The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
FYI, this was also reported in #20464 (comment). |
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 13, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 14, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 14, 2022
…d on macOS The isFocused() method on macOS works by checking if the selected BrowserWindow is a key window. Unfortunately doesn't work well with focus() and blur() because these weren'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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 14, 2022
…d on macOS 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 14, 2022
…d on macOS 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 14, 2022
…d on macOS 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 26, 2022
…d on macOS 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
Apr 26, 2022
…d on macOS 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
May 2, 2022
…d on macOS 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
RaisinTen
added a commit
to RaisinTen/electron
that referenced
this issue
May 3, 2022
…d on macOS 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
zcbenz
pushed a commit
that referenced
this issue
May 3, 2022
…d on macOS (#33734) 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: #33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
trop bot
pushed a commit
that referenced
this issue
May 3, 2022
…d on macOS 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: #33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
trop bot
pushed a commit
that referenced
this issue
May 3, 2022
…d on macOS 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: #33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
trop bot
pushed a commit
that referenced
this issue
May 3, 2022
…d on macOS 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: #33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
MarshallOfSound
pushed a commit
that referenced
this issue
May 4, 2022
…d 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: #33732 Signed-off-by: Darshan Sen <raisinten@gmail.com> Co-authored-by: Darshan Sen <raisinten@gmail.com>
MarshallOfSound
pushed a commit
that referenced
this issue
May 4, 2022
…d on macOS (#34030) 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: #33732 Signed-off-by: Darshan Sen <raisinten@gmail.com> Co-authored-by: Darshan Sen <raisinten@gmail.com>
MarshallOfSound
pushed a commit
that referenced
this issue
May 4, 2022
…d on macOS (#34029) 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: #33732 Signed-off-by: Darshan Sen <raisinten@gmail.com> Co-authored-by: Darshan Sen <raisinten@gmail.com>
khalwa
pushed a commit
to solarwindscloud/electron
that referenced
this issue
Feb 22, 2023
…d on macOS (electron#33734) 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: electron#33732 Signed-off-by: Darshan Sen <raisinten@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Preflight Checklist
Electron Version
18.0.3
What operating system are you using?
macOS
Operating System Version
macOS Monterey 12.2.1
What arch are you using?
x64
Last Known Working Electron version
Unknown, reproduces back to v14.
Expected Behavior
isFocused()
should returnfalse
afterblur()
has been called on it.Actual Behavior
It returns
true
instead, hence the assertion error:Testcase Gist URL
https://gist.github.com/RaisinTen/245976064623786f2276dd89d2df0185
Additional Information
No response
The text was updated successfully, but these errors were encountered: