fix(tabs): prevent trackpad taps from starting tab drag

This commit is contained in:
Weiki authored and GitHub committed 2026-09-03 18:10:26 +08:00
1 parent d765315af4
commit c28248cd67
3 files changed
+117 -22

No files matched your search

@@ -722,7 +722,7 @@ function handleTabMouseDown(event: PointerEvent, tabId: string) {
// Don't preventDefault touch pointerdowns: that would cancel the tab
// strip's native horizontal scroll, which is how touch users browse an
// overflowing tab bar.
if (event.pointerType !== "touch") event.preventDefault();
if (event.pointerType !== "touch" && (event.buttons & 1) === 1) event.preventDefault();
}
if (isManualTabOrder.value) tabDrag.startDrag(event, tabId);
}