# TASK 46 — Drawers: any click outside the rail closes the open drawer (TEST included) > Catalog: [`TASKS.md`](../TASKS.md). Status: ✅ **SHIPPED 2026-09-25**. ## Provenance - **2026-09-25, creator:** "when the test slide-out is active, then any click off the div should close the div — this behaviour applies to all tabs, not just TEST." ## Diagnosis The right-rail slides (Stream Settings / YPP / TEST; `TextPullOutHost` in `Controls/PreviewPane.xaml`) already close on any click outside the rail for Stream Settings + YPP — `MainWindow.Window_PreviewMouseLeftButtonDown` closes `BroadcastForm` and `Ypp` when `IsClickInsideDrawer` is false. The handler simply **omitted `TestSession`**, so the TEST drawer never dismissed on an outside click. The XAML comment mentioned "both" — stale once a third drawer landed. ## What shipped - `MainWindow.xaml.cs` — the outside-click close now also runs `TestSession.CloseDrawerCommand` when the TEST drawer is open (matching the other two; all three share `TextPullOutHost`, so the containment check is unchanged). - `Controls/PreviewPane.xaml` — comment corrected ("the rail … whichever is open"). - `ytLive.Tests/TestStreamTests.cs` — section-2 window test now opens TEST and Stream Settings, raises a window-root `PreviewMouseLeftButtonDown` (sourced on the window, i.e. outside the rail — deterministic, no OS mouse input, immune to the fullscreen mouse-steal flake), and asserts each closes. - Docs: `ai.md` (Test Stream section), `TASKS.md` (row 46), `HANDOFF.md` rewritten. ## Validation (Good Dog: ONE integration test) `TestStream_DockTooling_And_ThreeWayDrawerExclusivity` — extended section 2, no new tests: the raised outside-click asserts TEST (the fixed drawer) AND Stream Settings (the pre-existing behavior) both close. **Gate: clean build 0 warnings; full vstest (captured in HANDOFF).**