Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The mobile table of contents experiences a scrolling penetration issue #976

Closed
1 task
justin5267 opened this issue Oct 24, 2023 · 1 comment · Fixed by #986
Closed
1 task

The mobile table of contents experiences a scrolling penetration issue #976

justin5267 opened this issue Oct 24, 2023 · 1 comment · Fixed by #986
Labels
good first issue Good for newcomers

Comments

@justin5267
Copy link

What version of starlight are you using?

0.11.1

What version of astro are you using?

3.3.2

What package manager are you using?

npm

What operating system are you using?

win11

What browser are you using?

chrome

Describe the Bug

Wherein scrolling the mouse within the dropdown menu does not affect the toc content but instead causes the underlying document to scroll.

Link to Minimal Reproducible Example

bandicam.2023-10-24.10-14-50-755.mp4

Participation

  • I am willing to submit a pull request for this issue.
@delucis
Copy link
Member

delucis commented Oct 24, 2023

Thanks for the issue @justinliu1985! This should be fixable by setting overscroll-behavior: contain; on the scroll element:

<div class="dropdown">
<TableOfContentsList toc={toc.items} isMobile />
</div>

Officially our browser support includes some older versions of Safari that don’t support overscroll-behavior (15.4–15.6 desktop, and 15.4–15.7 on mobile), but that’s a small percentage of supported users and this feels like a good candidate for progressive enhancement where the current behaviour impacting a few people would be acceptable.

Happy to receive a PR if someone would like to make one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants