stoplightio / elements

Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.
https://stoplight.io/open-source/elements/
Apache License 2.0
1.6k stars 189 forks source link

Can't click anything in responsive sidebar unless scrollbar is at the top #2602

Open KianNH opened 1 week ago

KianNH commented 1 week ago

Context

This makes the responsive layout difficult to use on mobile.

Current Behavior

With a responsive layout, attempt to expand the sidebar, scroll at all and then try expand any of the sections - this will instead scroll you to the top of the sidebar.

Expected Behavior

Clicks should register and expand the section rather than scrolling to the top.

Possible Workaround/Solution

Users would have to use a different layout, such as sidebar or stacked.

Steps to Reproduce

  1. Go to https://deploy-preview-2599--stoplight-elements.netlify.app/?path=/story/public-api--responsive-layout
  2. Click on the 3 lines in the top left
  3. Scroll down slightly
  4. Attempt to click on, for example, Dashboards

https://github.com/stoplightio/elements/assets/94662631/fade293d-fe14-413e-9d26-9fc146f6edab

Environment