Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Don't activate tab on right click #9360

Merged
merged 1 commit into from
Jun 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions app/renderer/components/tabs/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,17 @@ class Tab extends React.Component {
}

onClickTab (e) {
if (e.button === 1) {
this.onTabClosedWithMouse(e)
} else {
e.stopPropagation()
appActions.tabActivateRequested(this.props.tabId)
switch (e.button) {
case 2:
// Ignore right click
return
case 1:
// Close tab with middle click
this.onTabClosedWithMouse(e)
break
default:
e.stopPropagation()
appActions.tabActivateRequested(this.props.tabId)
}
}

Expand Down