From c2865dbab9053ac82867ad40b5c831ec21383d3f Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Thu, 18 Apr 2019 08:16:52 +0100 Subject: [PATCH] Select tab when the mouse is pressed Selecting the tab when the mouse is pressed rather than only when it is released makes tab switching feel faster and also matches how the Chrome dev tools behave. The previous tab selection handler which listens for the radio button's selection has been kept for the benefit of interaction methods which don't trigger the mousedown handler. --- src/devtools/views/TabBar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/devtools/views/TabBar.js b/src/devtools/views/TabBar.js index d5ba8c5cb6..87031f7e2c 100644 --- a/src/devtools/views/TabBar.js +++ b/src/devtools/views/TabBar.js @@ -68,6 +68,7 @@ export default function TabBar({ )} key={id} onKeyDown={handleKeyDown} + onMouseDown={() => selectTab(id)} title={title || label} >