fix(nav): close the rail Settings and org-switcher flyouts on outside click (LC-692) #659
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/LC-692-flyout-outside-close"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The rail Settings gear flyout (Profile / Appearance / Notifications & Activity / Privacy & Security) and the enclave/org switcher above it stayed open when you clicked anywhere outside them - you had to click the trigger again to dismiss. Fixes LC-692.
Root cause
Both are native
<details>menus (lc-rail-menu,lc-sidebar-org-wrap). A native<details>only toggles from its own<summary>; the browser does not close it on an outside click, and nothing wired that up for these two. The account menu (JS<button>, sidebar_self.html) and the composer AI menu (details.lc-ai-menu, closed in live.js since LC-655) already dismiss on outside click - these two flyouts were the gap.Fix
One shared closer in
server/assets/live.js(already globally loaded, already home to the LC-655 lc-ai-menu closer), keyed on an opt-indata-lc-flyoutmarker, plus that marker on the two flyout<details>:details[data-lc-flyout]. A click inside the flyout leaves it open, so item links / htmx actions still fire before anything hides them (same pattern as LC-655).Opt-in marker so content-disclosure
<details>(collapsed call-event groups, attachment alt text, message overflow menus) are untouched, and any future flyout opts in with a single attribute.Scope
server/assets/live.js(shared closer),partials/enclave_switcher.html+partials/sidebar.html(adddata-lc-flyout). No Rust, no new CSS, no i18n.Verification
cargo checkcompiles all Askama templates.node --check server/assets/live.jspasses.🤖 Generated with Claude Code
https://claude.ai/code/session_011M7CNRsGzgzc48KinZUAQ8