Skip to content

[Bug]: on small screens, clicking outside of the side panel should close the side panel #50

@kgryte

Description

@kgryte

Currently, when viewing the API docs on a mobile device (small screens), when the side panel is open, the only way to close the panel is by clicking the toggle button.

However, I often found that I wanted to tap outside the panel on, e.g., the package README, expecting the side panel to automatically close in order to return me to the README view. This is not the case, however, as I need to explicitly tap the close button.

I propose, similar to how we query the view port to determine whether the side panel should be open on page load, we use the view port width to determine whether to add a click/touch handler to close the side panel on smaller devices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions