mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-18 06:28:40 -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 isLeftClick = event.nativeEvent.which === 1;
|
||||||
const isMiddleClick = event.nativeEvent.which === 2;
|
const isMiddleClick = event.nativeEvent.which === 2;
|
||||||
|
|
||||||
if (isLeftClick) {
|
if (isLeftClick && !this.props.isActive) {
|
||||||
if (this.props.isActive === null) {
|
this.props.onSelect();
|
||||||
this.props.onSelect();
|
|
||||||
}
|
|
||||||
} else if (isMiddleClick) {
|
} else if (isMiddleClick) {
|
||||||
this.props.onClose();
|
this.props.onClose();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue