Skip to content

Ctrl+K search modal requires multiple close clicks and causes inconsistent theme behavior #1511

@iamprasoon2006-cell

Description

@iamprasoon2006-cell

Bug Description

When opening the search modal using the keyboard shortcut (Ctrl + K), the modal does not close properly with a single click on the close button.

Instead, multiple clicks are required and different UI states change on each click:

  1. First click restores the scrollbar/background
  2. Second click changes overlay appearance/brightness
  3. Third click switches only the modal to light mode
  4. Fourth click finally closes the modal completely

However, when opening the search modal normally by clicking the search bar manually, the issue does not occur.

Steps To Reproduce

  1. Open the website
  2. Press Ctrl + K
  3. Click the close (X) button repeatedly
  4. Observe inconsistent closing and theme behavior

Expected Behavior

  • Modal should close completely with a single click
  • Theme should remain synchronized across the page and modal
  • Overlay/background state should reset correctly

Actual Behavior

  • Multiple close clicks are required
  • Theme partially updates
  • Background and modal states become inconsistent

Possible Cause

Potential issue with:

  • modal state cleanup
  • keyboard shortcut event handling
  • body scroll lock reset
  • theme synchronization logic

Metadata

Metadata

Labels

Enhacementgssoc26 labelgssoc26Contributions towards girl script summer of codelevel 110 pointsrecodethis is label for leaderboard

Type

Projects

Status

Done

Status

Q2 2026 – March-June

Relationships

None yet

Development

No branches or pull requests

Issue actions