Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(drag): stop blur listener leak on sidebar and shell drag gestures

shanu4903e9be7452
diff --git a/app/src/components/layout/shell/RootShellLayout.tsx b/app/src/components/layout/shell/RootShellLayout.tsx
index 8e15f7dc0c..bca788fe2d 100644
--- a/app/src/components/layout/shell/RootShellLayout.tsx
+++ b/app/src/components/layout/shell/RootShellLayout.tsx
@@ -182,7 +182,7 @@ export default function RootShellLayout({ sidebar, children, unframed }: RootShe
function detach() {
window.removeEventListener('pointerup', stop);
window.removeEventListener('pointercancel', stop);
- window.removeEventListener('blur-sm', stop);
+ window.removeEventListener('blur', stop);
document.body.style.removeProperty('cursor');
document.body.style.removeProperty('user-select');
draggingRef.current = false;
diff --git a/app/src/components/ui/Sidebar.tsx b/app/src/components/ui/Sidebar.tsx
index b4767d957e..eae4bb9451 100644
--- a/app/src/components/ui/Sidebar.tsx
+++ b/app/src/components/ui/Sidebar.tsx
@@ -280,7 +280,7 @@ export const SidebarRail = forwardRef<HTMLDivElement, SidebarRailProps>(
window.removeEventListener('pointermove', handleMove);
window.removeEventListener('pointerup', detach);
window.removeEventListener('pointercancel', detach);
- window.removeEventListener('blur-sm', detach);
+ window.removeEventListener('blur', detach);
detachRef.current = null;
};