Skip to content

fix: replace userDropdown id with class for mobile compatibility#767

Open
lane711 wants to merge 3 commits intomainfrom
fix/issue-398-mobile-dropdown-ids
Open

fix: replace userDropdown id with class for mobile compatibility#767
lane711 wants to merge 3 commits intomainfrom
fix/issue-398-mobile-dropdown-ids

Conversation

@lane711
Copy link
Copy Markdown
Collaborator

@lane711 lane711 commented Apr 9, 2026

Summary

  • getElementById("userDropdown") only returns the first matching element, breaking the dropdown when both desktop sidebar and mobile menu render one
  • Switched all 3 layout templates (admin-layout-v2, admin-layout-catalyst, glass-admin) to use querySelectorAll(".userDropdown") so every dropdown instance toggles correctly
  • Changed the HTML from id="userDropdown" to class="userDropdown" where needed

Test plan

  • Open admin panel on desktop — verify user dropdown works
  • Resize to mobile width — verify hamburger menu user dropdown works
  • Test across all 3 layout variants (v2, catalyst, glass-admin)

Closes #398

🤖 Generated with Claude Code

claude added 3 commits April 8, 2026 17:48
Using getElementById('userDropdown') breaks when multiple dropdown
elements exist (e.g., desktop sidebar + mobile hamburger menu both
render a user dropdown). Only the first element is found, leaving
the other non-functional.

Switch all templates to use querySelectorAll('.userDropdown') so
every dropdown instance toggles correctly.

Closes #398

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Bug: Admin > Mobile Sidebar > User Dropdown will not appear

2 participants