mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-14 12:58:39 -09:00
Fix tab navigation using mouse clicks (#732)
Fixes a bug introduced by #723
This commit is contained in:
parent
4ec0156440
commit
ac69e0b9a0
1 changed files with 2 additions and 4 deletions
|
|
@ -34,10 +34,8 @@ export default class Tab extends Component {
|
|||
const isLeftClick = event.nativeEvent.which === 1;
|
||||
const isMiddleClick = event.nativeEvent.which === 2;
|
||||
|
||||
if (isLeftClick) {
|
||||
if (this.props.isActive === null) {
|
||||
this.props.onSelect();
|
||||
}
|
||||
if (isLeftClick && !this.props.isActive) {
|
||||
this.props.onSelect();
|
||||
} else if (isMiddleClick) {
|
||||
this.props.onClose();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue