From ac69e0b9a09653bb94e38525a1838cb8cbb88823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20G=C3=B3mez?= Date: Wed, 21 Sep 2016 14:44:47 -0400 Subject: [PATCH] Fix tab navigation using mouse clicks (#732) Fixes a bug introduced by #723 --- lib/components/tab.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/components/tab.js b/lib/components/tab.js index 3187c37f..a51eb8d1 100644 --- a/lib/components/tab.js +++ b/lib/components/tab.js @@ -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(); }