Skip to content

Close nav dropdowns on an outside click - #190

Merged
brianglass merged 1 commit into
mainfrom
close-nav-dropdown-on-outside-click
Aug 17, 2026
Merged

Close nav dropdowns on an outside click#190
brianglass merged 1 commit into
mainfrom
close-nav-dropdown-on-outside-click

Conversation

@brianglass

Copy link
Copy Markdown
Owner

Summary

  • The "Integrations"/"More" nav dropdowns (native <details>/<summary>) only closed on a second click on their own summary. Clicking anywhere else on the page left them open.
  • Adds a delegated click listener in base.html that closes any open .topbar-inner > nav details whose subtree doesn't contain the click target -- clicks on the dropdown's own links are left alone so navigation still works normally.

Test plan

  • Verified in-browser: summary click opens the dropdown, a click elsewhere closes it, a click on a link inside the open dropdown does not force-close it before navigating.
  • docker compose run --rm tests -- all 152 tests pass (JS-only change, no test coverage expected to be affected).

Also serves as the first real end-to-end test of the new cloudbuild.yaml-based deploy pipeline (#189) -- merging this should trigger a build sourced entirely from the tracked config file for the first time.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3

Native <details> only closes on a second click on its own <summary> (or
when a sibling in the same name= group opens) -- it stays open if you
click anywhere else on the page, which reads as broken for a nav
dropdown. A single delegated click listener closes any open
.topbar-inner > nav details whose subtree doesn't contain the click
target, so clicks on the dropdown's own contents (its links) are left
alone.

Verified in-browser: opens on summary click, closes on an outside
click, stays open when clicking a link inside it (so navigation isn't
interrupted).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
@brianglass
brianglass merged commit d97cc85 into main Aug 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant