Skip to content
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

Fix tab close on middle click for Electron 3 #552

merged 1 commit into from Jan 24, 2019


None yet
3 participants
Copy link

VarNepvius commented Dec 21, 2018

Description of the Problem

When using Atom with Electron 3, a middle click does not close a tab. This happens, because Electron 3 is based on a Chrome version >= 55. Since then, Chrome changed how click events work. Non-primary clicks now fire the event auxclick rather than click.

See and for more information on the event.

Description of the Change

This PR adds the onClick handler of TabBarView also as listener to the auxclick event.

Alternate Designs



The change fixes the problem for Electron 3 while it does have no effect in Electron 2, since the auxclick event never fires in this version.

This helps with a future migration of Atom to Electron 3 and fixes the issue for unofficial distributions using Electron 3 now.

Possible Drawbacks


Applicable Issues

fixes #545


This comment has been minimized.

Copy link

eli-schwartz commented Dec 23, 2018

One unofficial distribution using electron 3 today is Arch Linux:

@eli-schwartz eli-schwartz referenced this pull request Dec 23, 2018


Upgrade to Electron 3.0 #18603

59 of 59 tasks complete

This comment has been minimized.

Copy link

daviwil commented Jan 24, 2019

Thanks a lot, @VarNepvius! Verified that this fixes the issue on a build of Atom on Electron 3 and it also doesn't have any negative side effects on Atom 1.34.0 stable.

@daviwil daviwil merged commit 949a38d into atom:master Jan 24, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.