Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close the new USWDS page header dropdown when clicking outside of it #1296

Open
dzole0311 opened this issue Dec 6, 2024 · 1 comment
Open
Assignees
Labels
veda v2 VEDA Refactor Epic Work

Comments

@dzole0311
Copy link
Collaborator

dzole0311 commented Dec 6, 2024

Context

The new USWDS page header nav dropdowns, after being opened, persist their open state even after attempting to click outside of the dropdown (e.g visiting another nav item, or clicking outside of the dropdown).

This is a follow up from the new USWDS page header work: #1247

Priority:

Steps to reproduce the issue

  1. Enable the new page header via a feature flag (ENABLE_USWDS_PAGE_HEADER)
  2. Click on one of the dropdowns
  3. Then click on another nav item (e.g the Exploration nav item)
  4. Notice that the dropdown remains open
@AliceR
Copy link
Member

AliceR commented Dec 16, 2024

This is how the uswds library handles the situation: https://github.com/uswds/uswds/blob/develop/packages/usa-header/src/index.js#L213 - in case that helps.
And this is the unanswered bug ticket in the react-uswds repository: trussworks/react-uswds#2592 (they actually see this as a feature, not a bug)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
veda v2 VEDA Refactor Epic Work
Projects
None yet
Development

No branches or pull requests

3 participants