Skip to content

🐛 Bug: Dark/Light Mode Toggle Doesn't Close Automatically on Mobile #1281

Closed
@Karan-Palan

Description

@Karan-Palan

Describe the bug

On the mobile view of the JSON Schema website, when the dark/light mode toggle is opened, it remains open even after the user clicks outside of the toggle or interacts with other elements on the page. This behavior clutters the interface and negatively impacts usability.

Steps To Reproduce

  1. Open the website in mobile view or on a mobile device.
  2. Click on the dark/light mode toggle to open it.
  3. Click anywhere outside the toggle, such as on the main content or a navigation element.
  4. Observe that the toggle remains open and does not close automatically.

Expected Behavior

The dark/light mode toggle should close automatically when:

  1. The user clicks anywhere outside the toggle.
  2. The user interacts with other page elements.

Screenshots

Screencast.from.2025-01-10.16-56-02.webm

Device Information [optional]

- OS:
- Browser:
- version:

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

Metadata

Metadata

Assignees

Labels

Status: AcceptedIt's clear what the subject of the issue is about, and what the resolution should be.Status: In ProgressThis issue is being worked on, and has someone assigned.🐛 BugIndicates that the issue is a bug or defect.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions