This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
Fix tab close on middle click for Electron 3 - #552
Merged
Merged
Conversation
|
One unofficial distribution using electron 3 today is Arch Linux: https://bugs.archlinux.org/task/61047 |
59 tasks done
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
auxclickrather thanclick.See https://developers.google.com/web/updates/2016/10/auxclick and https://developer.mozilla.org/en-US/docs/Web/Events/auxclick for more information on the event.
Description of the Change
This PR adds the
onClickhandler of TabBarView also as listener to theauxclickevent.Alternate Designs
None
Benefits
The change fixes the problem for Electron 3 while it does have no effect in Electron 2, since the
auxclickevent 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
None
Applicable Issues
fixes #545