Feature description
Tabs in the group tab bar can currently only be closed with the × button or the context menu. Browsers and most editors also close a tab on middle mouse click, and muscle memory makes people try it here too. Right now a middle click does nothing (it just activates the tab).
Proposed solution
Close a non-permanent tab on middle click (auxclick with button === 1) in GroupTabBar.svelte, for both workspace and Home tab groups, reusing the existing close handler so the behaviour matches the × button.
Two small details worth handling at the same time:
- The
pointerdown handler currently activates the tab for any mouse button. Restricting it to the primary button avoids briefly focusing a background tab before it is closed.
- Cancelling
pointerdown for the middle button suppresses the browser's autoscroll cursor on Linux/Windows.
Permanent tabs (Home, Files) are excluded, same as they have no × button.
Additional context
Implemented on a fork; single-file frontend change (+18/-1):
main...ebifrier:computer:feat/middle-click-close-tab
Related: #254 (rename tabs via the tab-bar context menu) touches the same tab bar but is a separate feature.
Feature description
Tabs in the group tab bar can currently only be closed with the
×button or the context menu. Browsers and most editors also close a tab on middle mouse click, and muscle memory makes people try it here too. Right now a middle click does nothing (it just activates the tab).Proposed solution
Close a non-permanent tab on middle click (
auxclickwithbutton === 1) inGroupTabBar.svelte, for both workspace and Home tab groups, reusing the existing close handler so the behaviour matches the×button.Two small details worth handling at the same time:
pointerdownhandler currently activates the tab for any mouse button. Restricting it to the primary button avoids briefly focusing a background tab before it is closed.pointerdownfor the middle button suppresses the browser's autoscroll cursor on Linux/Windows.Permanent tabs (Home, Files) are excluded, same as they have no
×button.Additional context
Implemented on a fork; single-file frontend change (+18/-1):
main...ebifrier:computer:feat/middle-click-close-tab
Related: #254 (rename tabs via the tab-bar context menu) touches the same tab bar but is a separate feature.