Keep agent panes mounted and focused

This commit is contained in:
Mohamed Boudra
2026-05-18 11:24:56 +07:00
parent 69fc6fe754
commit 82319f5805
4 changed files with 91 additions and 3 deletions
@@ -23,4 +23,13 @@ describe("shouldFocusPaneFromEventTarget", () => {
).toBe(true);
expect(shouldFocusPaneFromEventTarget(null)).toBe(true);
});
it("returns true for composer text inputs so focusing the composer focuses the pane", () => {
expect(
shouldFocusPaneFromEventTarget({
closest: (selector: string) =>
selector.includes("input") ? ({ tagName: "INPUT" } as Element) : null,
} as unknown as EventTarget),
).toBe(true);
});
});