tanstack.com icon indicating copy to clipboard operation
tanstack.com copied to clipboard

[Bug] Dropdown reopens fail due to modal context blocking

Open Dhavanesh24cs412 opened this issue 1 week ago • 0 comments

Title: [Bug] Framework/Library Dropdown Can Only Be Opened Once Per Search Session

Description:

Problem

The framework and library dropdown menus in the search modal can only be opened once per search session. After the first open-close cycle, subsequent attempts to open the dropdown fail until the search modal is closed and reopened.

Image

Steps to Reproduce

  1. Open the search modal (Cmd+K or Ctrl+K)
  2. Click the "Library" or "Framework" dropdown
  3. Dropdown opens ✓
  4. Click it again
  5. Dropdown closes ✓
  6. Click it a third time
  7. Dropdown does NOT open ✗ (BUG)
  8. Only way to make it work again is to close and reopen the entire search modal

Root Cause

The modal={true} prop in the Radix Dropdown component creates a modal context that:

  • Blocks all interactions with elements outside the dropdown
  • Prevents proper state management for re-opens
  • Creates focus trapping that interferes with subsequent opens

Expected Behavior

The dropdown should open and close repeatedly without needing to close the entire search modal.

Environment

  • Framework: React 18+
  • Radix UI: @radix-ui/react-dropdown-menu
  • Browser: [Any modern browser]

Severity

Medium - Affects user experience when filtering search results multiple times

Dhavanesh24cs412 avatar Jan 14 '26 19:01 Dhavanesh24cs412