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]: Linux: Double actions when handling app-command handlers: browser-backward and browser-forward #18322 #32763
Comments
Thanks for reporting this and helping to make Electron better! Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use. If you take the code from either of the examples you provided and the issue replicable in the Fiddle Gist, that will helpful. Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests. I'm adding the |
index.js
On Windows: back/forward button presses will go back/forward one page at a time |
I'm experiencing this issue with Slack's snap on Ubuntu 22.04 as well.
|
Same here, very annoying bug! If I install Slack from another source instead of snap, would we have the same issue? |
No, I've tried both versions and it seems to be a problem with Slack's imported version of Electron. I also reached out to Slack support and they said they were aware of the problem, but gave no timeline for an intended fix. |
I have this issue on Discord as well. |
Also experiencing this on Slack in Ubuntu 22.04. |
Same here. Is there any way that we could move the discussion forward on which solution might be workable?
@MarshallOfSound might you have an opinion? I ask as you reviewed #15441 and your profile indicates that you work at Slack right now. |
Bump on this. In the meanwhile you can use the keyboard shortcut: ALT + LEFT. |
Tested again on electron |
Still getting this in Slack (v4.28.171) on Ubuntu 20.04, and have had this for a few years now. |
Thats what they already said, when I reported the issue to Slack 2 years ago unfortunately.. I don't expect them to fix this anymore while it still annoyes me every single day. |
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! |
bump 🙏 |
It's still broken. |
Very annoying issue. I'm getting on Slack 4.29.149 64-bit Ubuntu 22.04 |
Yes, still happening and immensely frustrating. |
Happening for me on Slack Debian 11, as well. |
bump |
bump, Slack desktop on Arch linux and XFCE4. |
bump |
Still experiencing the issue in Slack. |
Experiencing this issue with WebCatalog on Linux. |
Still experienceing this with the Slack app in Ubuntu |
I am experiencing this as well on |
Seeing this bug on Ubuntu 18.04 as well as 22.04. Slack version 4.32.127 64-bit. Extremely annoying. I have several other Electron apps which do not have this problem, e.g. VS Code and Discord, so presumably it's just an electron version issue? |
Most likely the apps that do not have this issue are explicitly ignoring either the app-command events or the navigation events. |
hello @codebytere But I didn't find the default handing of I would be more than happy to submit a pr for this |
Is there any work around? We have many people using slack and this is a significant usability issue. |
The keyboard shortcuts work. Another option on Linux is to use the Slack webapp instead of the desktop app - the back/forward mouse buttons work there for me. |
Today my compagny rollout a new slack release and it's still there. I can't believe it's still not fixed. |
Still experiencing the issue in Slack. |
One workaround for Slack (works on Ubuntu 22.04) with an additional right click:
|
itsdanomano found a temporary solution for the issue (posted on reddit), but it has to be re-done after every app update. Also for Snap its not so easy as the snap files are read only. Maybe one could work arround the issue with file mounts. |
doesn't work for me |
Try the command from the mythin's message. Works for me |
I also would love to see this fixed: I must reapply the reddit fix each time slack gets updated unfortunately. |
Preflight Checklist
Electron Version
Confirmed to impact these versions:
16, v17.0.0, v20.1.0
Probably impacts all versions in between.
What operating system are you using?
Other Linux
Operating System Version
Linux lun-hisame-nixos 5.15.19-xanmod1-tt #1-NixOS SMP PREEMPT Tue Jan 1 00:00:00 UTC 1980 x86_64 GNU/Linux
What arch are you using?
x64
Last Known Working Electron version
4
Expected Behavior
When pressing back/forward mouse buttons on linux, either app command events should be created OR they should be automatically handled and cause navigation.
Two suggested approaches:
Actual Behavior
When the mouse side buttons are used, app command events are created AND navigation is automatically done so if an app handles the app-command events per the documentation then navigation will happen twice.
#15441 added support for app-command handlers: browser-backward and browser-forward on Linux.
The docs describe how to make use of these here:
https://github.com/electron/electron/blob/v5.0.1/docs/api/browser-window.md#event-app-command-windows-linux
Our code is very similar here, and has been in place to support windows for years:
https://github.com/irccloud/irccloud-desktop/blob/master/app/main.js#L293-L311
When testing this on Ubuntu 19.04, this results in back and forward actions being triggered twice when using the appropriate mouse buttons.
Testcase Gist URL
https://gist.github.com/LunNova/a4c61b7082d17b8aa637217f763348bf
Additional Information
A previous ticket was closed #18322 but this is still a problem. I have asked for it to be reopened, but noone seems to have seen that.
Related third party ticket https://support.discord.com/hc/en-us/community/posts/1500000622702-Thumb-mouse-button-on-Linux-registers-twice
The text was updated successfully, but these errors were encountered: