-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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]: Calling webContents.focus() forces the entire window to raise above other windows on Linux/GNOME #38184
Comments
+1 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
+1 |
Happens on Fedora 37 with MATE desktop as well, see comment mattermost/desktop#1827 (comment) |
Can confirm on Xfce, xUbuntu versions 16.04 (Xenial), 18.04 (Bionic), and 20.04 (Focal). |
+1 |
Further, this bug also happens from time to time on i3wm/Sway. Obsidian does not forcibly raise itself and switch workspaces, but Discord and Steam do. And it's annoying. |
Further odd behavior: when running under Hyprland, all three of Obsidian, Steam, and Discord raise themselves, but workspace switching is sporadic. Further, ZSA's Keymapp utility did not raise itself under any of these environments. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
+1 |
Preflight Checklist
Electron Version
24.1.3
What operating system are you using?
Ubuntu
Operating System Version
22.04.2 LTS, GNOME 42.5
What arch are you using?
x64
Last Known Working Electron version
Not sure, it's been around a while.
Expected Behavior
gnome-tweaks
, turn on "Focus on Hover" under the Windows categorywebContents.focus()
is called when the window is focused (see gist), and then click on another window that overlaps the application.The app should take focus, but the window should not raise above the overlapping app.
Actual Behavior
The app takes focus, and the window raises over top.
Testcase Gist URL
https://gist.github.com/devinbinnie/c0262f5c890edc033fdfe5b7e4209ded
Additional Information
This issue particularly impacts applications where the developer might want to focus a
BrowserView
when the application is focused, and the user has "sloppy focus" or focus-on-hover enabled on their system.eg. This issue: mattermost/desktop#1827
The text was updated successfully, but these errors were encountered: