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

Commit

Permalink
Merge pull request #9360 from bsclifton/fix-tab-focus
Browse files Browse the repository at this point in the history
Don't activate tab on right click
  • Loading branch information
bbondy committed Jun 13, 2017
1 parent 2b2286f commit ab2cc4e
Showing 1 changed file with 11 additions and 5 deletions.
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

0 comments on commit ab2cc4e

Please sign in to comment.