@samitouri / QOS-React-2 / commits / c2865dbab9

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.

Robert Knight committed Apr 18, 2019 at 08:16 UTC c2865dbab9053ac82867ad40b5c831ec21383d3f
1 file changed +1
src/devtools/views/TabBar.js
+1
@@ -68,6 +68,7 @@ export default function TabBar({
68 )}
69 key={id}
70 onKeyDown={handleKeyDown}
71 + onMouseDown={() => selectTab(id)}
72 title={title || label}
73 >
74 <input