You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kubuntu 17.10 switching keyboard layout opens BrowserWindow menu #11106
Electron version: 1.7.9, 1.8.2-beta.2, 2.0.14, 3.0.14, 3.1.0, 4.0.1
Operating system: Kubuntu 17.10, Kubuntu 18.04
Expected behavior
When a global keyboard is setup to change keyboard layout using Alt+Ctrl or Alt+Shift should just change keyboard layout and have no effect on any focused electron windows.
Actual behavior
Keyboard layout is changed correctly, but if an electron browser window is focused the menu appears. If the menu has not been enabled on the BrowserWindow, but the application menu has been set the menu bar is shown and menu opened
How to reproduce
Electron Quick start will reproduce with an application menu set, as per the example in the docs.
Configure a global keyboard shortcut to switch keyboard layouts
Open System Settings
Go to Input Devices
Select Keyboard and then the Layouts tab
Change the Main Shortcut
Pick Alt+Ctrl or Alt+Shift as a shortcut
Now you're configured, press Alt+Ctrl (note that it must be in that order, not ctrl then alt) it will change the keyboard layout and also present the menu in the focused window.
Reacted by ZEN, ComBin, Dzmitry Paulenka, Tsvetan Ganev, kivan, Gagarin, Ory Band, Anas Emad, Alexey Murz Korepov, protist and 13 more
Forgive my ignorance, but wouldn't it be on Kubuntu to capture the keyboard event and to not propagate it? It seems impossible for Electron to detect if the operating system (or other apps) have any handlers registered.
I'm not 100% sure what's going on under the hood here and normally my bias would be towards it needing to be fixed in Kubuntu; hoever I tried running the same test with a few other apps, namely, Firefox and Dolphin, but didn't see the same behaviour. That's what made me suspicious that it's something that electron is doing.
The only other app I managed to see the same behaviour with alongside my test apps was Slack - which is on electron too.
@felixrieseberg What's the best way forward that you recommend here? Report to Kubuntu and see if they have any insight or do you think it's worth investigating if there's anything in electron?
The same issue happens under Cinnamon desktop in Archlinux, applications have to work around this in some obscure ways - RocketChat/Rocket.Chat.Electron#50.
ALL electron based apps are affected, and this is very annoying.
Slack, Messenger for Desktop just to name a few. I use alt shift to change keyboard layouts and every time I need to insert a russian word in a chat, it opens this damned menu.
Please fix
Reacted by Vladimir Rapatsky, Jona Abdinghoff and Nikolai Minkevich
@msva No. Exact 2.6.0. You can mannualy download any release from slack.com by changed url https://downloads.slack-edge.com/linux_releases/slack-desktop-2.6.0-amd64.deb
Current issue is for too old Electron (2.0+) and have workaround via adding keyboard shortcuts to all menu items (example of fixing - here element-hq/element-web#4345 (comment)), that solve reported problem on related versions in most of popular Electron apps.
But Electron 6.0 release introduce new issue, that can't solved via proposed workaround, and need separate investigate for find right fix. So I fill new separate issue for Electron 6.0 version here: #22213 - please vote!
My job is consist of endles suffering because of this. Even if you having a habit press esc or worse ALT ANY TIME YOU WANT TO SWITCH LAYOUT this behaviour apppears. You just cant switch to NORMAL app, so you continue press this ALT key in every application you work so this make app open context menu. This not just annoying bug this destroy all of my and i'm sure not only my productivity.
Reacted by Valentine, Alexander and Andrii Oriekhov
But why keyboards switching laoyuts works well in old Electron 5.0 apps (with fresh xorg), and breaks if they upgrade to Electron 6.0 and later versions?
But why keyboards switching laoyuts works well in old Electron 5.0 apps (with fresh xorg), and breaks if they upgrade to Electron 6.0 and later versions?
I suggest there was some workaround in previous electron version (upgrade from linux mint 18.3 to 19.3 broke my slack for example), anyway xorg-server patch from issue above works for me (but in manjaro linux, not sure about ubuntu based distributions).
@oukooveu looks like this wont work for me because I am running Debian 10 using Gnome 3.30.2 and i have to use Xorg because Wayland does not work with Nvidia.
I think we can agree that this issue should be solved in electron.
@oukooveu This also won't work for me, because I'm affected by the Electron bug and not the Xorg bug. I use At-home-modifier with my ergonomic keyboard to use Enter as Alt when held down. Hence, before sending Enter, my system presses and releases Alt first, which triggers the electron menu, removing focus, and not sending Enter to the right place. Super frustrating!
So I agree; this issue can only be solved in Electron for me too.
If you're still experiencing this issue on a supported version, please open a new issue with an updated repro - a Fiddle is very appreciated.
Electron has a large issues backlog. To help our team prioritize, we're closing older issues and asking for new issues with updated repro steps if it affects a supported version. This helps sort what issues are still relevant and helps us fix them more quickly.
Thanks for your patience and understanding!
Reacted by Alexandr, Andrey Izman and Nika Krasnova
Activity
felixrieseberg commentedon Nov 14, 2017
Forgive my ignorance, but wouldn't it be on Kubuntu to capture the keyboard event and to not propagate it? It seems impossible for Electron to detect if the operating system (or other apps) have any handlers registered.
Thomas101 commentedon Nov 15, 2017
I'm not 100% sure what's going on under the hood here and normally my bias would be towards it needing to be fixed in Kubuntu; hoever I tried running the same test with a few other apps, namely, Firefox and Dolphin, but didn't see the same behaviour. That's what made me suspicious that it's something that electron is doing.
The only other app I managed to see the same behaviour with alongside my test apps was Slack - which is on electron too.
@felixrieseberg What's the best way forward that you recommend here? Report to Kubuntu and see if they have any insight or do you think it's worth investigating if there's anything in electron?
mtb-xt commentedon Nov 21, 2017
The same issue happens under Cinnamon desktop in Archlinux, applications have to work around this in some obscure ways - RocketChat/Rocket.Chat.Electron#50.
ALL electron based apps are affected, and this is very annoying.
Slack, Messenger for Desktop just to name a few. I use alt shift to change keyboard layouts and every time I need to insert a russian word in a chat, it opens this damned menu.
Please fix
mpeshev commentedon Nov 23, 2017
I can confirm the same issue with Fedora running Mate.
I ran some tests referenced in a Russian forum where different suggestions editing the Window or Edit labels were referenced.
I've played with adding an accelerator element to
buildEditMenu()forEditbut that crashed Slack and I couldn't progress further.It's been happening for weeks and I can't reproduce it in any other web or desktop application that I use daily.
On Slack, a couple of important keyboard shortcuts use "Alt + Shift" as well and those are inactive for me at the moment.
gedia commentedon Dec 14, 2017
Same on gentoo with slack 2.8.2. Several of the previous versions were affected too. This wasn't present several releases ago...
vetash commentedon Dec 14, 2017
@gedia switch to 2.6.0. This is latest release that not have this behaviour.
msva commentedon Dec 21, 2017
@vetash wasn't it 2.6.3? // and there is no 2.6.0 in portage anyways.
P.S. looks like issue still appears in 3.0.2, although slack's support sweared (38 days ago) me to fix this in "next version"
vetash commentedon Dec 23, 2017
@msva No. Exact 2.6.0. You can mannualy download any release from slack.com by changed url
https://downloads.slack-edge.com/linux_releases/slack-desktop-2.6.0-amd64.debgedia commentedon Jan 19, 2018
Still affecting slack 3.0.5, released this week...
31 remaining items
MurzNN commentedon Feb 16, 2020
Current issue is for too old Electron (2.0+) and have workaround via adding keyboard shortcuts to all menu items (example of fixing - here element-hq/element-web#4345 (comment)), that solve reported problem on related versions in most of popular Electron apps.
But Electron 6.0 release introduce new issue, that can't solved via proposed workaround, and need separate investigate for find right fix. So I fill new separate issue for Electron 6.0 version here: #22213 - please vote!
Dreyk007 commentedon May 8, 2020
Very annoying. Issue actual for every electron app (VSCode, Zulip, etc...)
KDE Neon (Ubuntu 18.04)
protist commentedon May 31, 2020
This bug is still present in Electron 9.0.0.
vetash commentedon Jun 15, 2020
My job is consist of endles suffering because of this. Even if you having a habit press
escor worseALTANY TIME YOU WANT TO SWITCH LAYOUT this behaviour apppears. You just cant switch to NORMAL app, so you continue press thisALTkey in every application you work so this make app open context menu. This not just annoying bug this destroy all of my and i'm sure not only my productivity.oukooveu commentedon Jun 24, 2020
Most probably this issue related to electron indirectly and actual root cause is https://gitlab.freedesktop.org/xorg/xserver/-/issues/258 (opened 15 years ago).
MurzNN commentedon Jun 24, 2020
But why keyboards switching laoyuts works well in old Electron 5.0 apps (with fresh xorg), and breaks if they upgrade to Electron 6.0 and later versions?
oukooveu commentedon Jun 24, 2020
I suggest there was some workaround in previous electron version (upgrade from linux mint 18.3 to 19.3 broke my slack for example), anyway xorg-server patch from issue above works for me (but in manjaro linux, not sure about ubuntu based distributions).
DanielLitvak commentedon Aug 18, 2020
@oukooveu looks like this wont work for me because I am running Debian 10 using Gnome 3.30.2 and i have to use Xorg because Wayland does not work with Nvidia.
I think we can agree that this issue should be solved in electron.
protist commentedon Aug 18, 2020
@oukooveu This also won't work for me, because I'm affected by the Electron bug and not the Xorg bug. I use At-home-modifier with my ergonomic keyboard to use
EnterasAltwhen held down. Hence, before sendingEnter, my system presses and releasesAltfirst, which triggers the electron menu, removing focus, and not sendingEnterto the right place. Super frustrating!So I agree; this issue can only be solved in Electron for me too.
vavadik commentedon Sep 8, 2020
A little trick for those who struggle with VS Code: set window.titleBarStyle option to 'custom' and the issue is gone.
Sarbinski commentedon Sep 8, 2020
Thank you for this, now somebody to give a solution for Slack 💯
P.S. The issue is still persist on the Kubuntu 20.04
electron-triage commentedon Mar 10, 2021
The Electron version reported on this issue is no longer supported. See our supported versions documentation.
If you're still experiencing this issue on a supported version, please open a new issue with an updated repro - a Fiddle is very appreciated.
Electron has a large issues backlog. To help our team prioritize, we're closing older issues and asking for new issues with updated repro steps if it affects a supported version. This helps sort what issues are still relevant and helps us fix them more quickly.
Thanks for your patience and understanding!
protist commentedon Mar 11, 2021
The similar issue #22213 was also closed by the bot. The new issue is #28088.