Fix middle-click selecting tab that is being closed
This commit is contained in:
parent
0186e6330a
commit
5928147f26
1 changed files with 4 additions and 0 deletions
|
@ -110,6 +110,10 @@ const TabBar = forwardRef(function (props, ref) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTabMouseDown(event, id) {
|
function handleTabMouseDown(event, id) {
|
||||||
|
// Don't select tab if it'll be closed with middle button click on mouse up
|
||||||
|
if (event.button === 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (event.button === 2) {
|
if (event.button === 2) {
|
||||||
let { screenX, screenY } = event;
|
let { screenX, screenY } = event;
|
||||||
// Popup gets immediately closed without this
|
// Popup gets immediately closed without this
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue