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
Linux: Double actions when handling app-command handlers: browser-backward and browser-forward #18322
Thank you for taking the time to report this issue and helping to make Electron better.
The version of Electron you reported this on has been superseded by newer releases.
If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.
I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.
We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.
I have now tested this on electron 8.0.2 on Linux, and the back/forward mouse buttons are still functioning without binding app-command. The documentation still suggests that binding this event is needed:
I worked around this for now by using Piper to reassign the forward/back buttons on my Logitech mouse to "alt+left" and "alt+right" rather than "backward/forward". This has a side-effect of focusing the menubar in electron apps, which is annoying and clunky, but less so than double actions.
I've ended up with this browserwindow.js
but its not working i dont know what im doing wrong
and im pretty sure im doing the injection correctly (Instructions)
@hawkeyetwolf, this workaround with Piper, is it possible to use it with Slack/Discord only, and keep default behavior on other apps? Could you share more details about it or how to do it? Thanks.
@lmcarreiro, Piper is a system-wide tool, so I don't think there's a way to limit it to Slack/Discord only, unfortunately. And it only works for the mouse buttons, but in my case, that's all I needed. Here's a post about configuring Piper.
Activity
jwheare commentedon May 16, 2019
cc @SaswatB @MarshallOfSound
jwheare commentedon May 17, 2019
Just confirmed that
e.preventDefault()does not prevent this after allelectron-triage commentedon Feb 19, 2020
Thank you for taking the time to report this issue and helping to make Electron better.
The version of Electron you reported this on has been superseded by newer releases.
If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.
I'm setting the
blocked/need-infolabel for the above reasons. This issue will be closed 7 days from now if there is no response.Thanks in advance! Your help is appreciated.
electron-triage commentedon Feb 26, 2020
Thank you for your issue!
We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.
jwheare commentedon Mar 1, 2020
I have now tested this on electron 8.0.2 on Linux, and the back/forward mouse buttons are still functioning without binding app-command. The documentation still suggests that binding this event is needed:
https://github.com/electron/electron/blob/v8.0.2/docs/api/browser-window.md#event-app-command-windows-linux
This is by no means a major issue, but just misleading: if the docs are followed, double actions will be registered.
hawkeyetwolf commentedon Apr 6, 2021
I worked around this for now by using Piper to reassign the forward/back buttons on my Logitech mouse to "alt+left" and "alt+right" rather than "backward/forward". This has a side-effect of focusing the menubar in electron apps, which is annoying and clunky, but less so than double actions.
LunNova commentedon Dec 26, 2021
This should be reopened as it is still an issue.
Discord issue caused by this issue: https://support.discord.com/hc/en-us/community/posts/1500000622702-Thumb-mouse-button-on-Linux-registers-twice
Add workaround for electron/electron#18322
Rayrsn commentedon Jan 5, 2022
@LunNova how can i apply your "workaround" with BetterDiscord?
LunNova commentedon Jan 6, 2022
Apply the same .diff but to this file and change
wintothis.Rayrsn commentedon Jan 6, 2022
I've ended up with this browserwindow.js
but its not working i dont know what im doing wrong
and im pretty sure im doing the injection correctly (Instructions)
LunNova commentedon Jan 6, 2022
Maybe that should be
Otherwise, not sure and I don't use BetterDiscord, sorry.
Inve1951 commentedon Jan 7, 2022
Here's a NavigationFix for BD.
@Rayrsn
Rayrsn commentedon Jan 8, 2022
@Inve1951 Thanks brother.
LunNova commentedon Feb 6, 2022
Raised #32763 since it seems unlikely this will get reopened.
lmcarreiro commentedon Jun 17, 2022
@hawkeyetwolf, this workaround with Piper, is it possible to use it with Slack/Discord only, and keep default behavior on other apps? Could you share more details about it or how to do it? Thanks.
hawkeyetwolf commentedon Jun 19, 2022
@lmcarreiro, Piper is a system-wide tool, so I don't think there's a way to limit it to Slack/Discord only, unfortunately. And it only works for the mouse buttons, but in my case, that's all I needed. Here's a post about configuring Piper.