deepmodeling / deepmodeling/deepmodeling_sphinx

[Code scan] Define the mobile menu no-scroll state in CSS

Open
#88 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
2
Forks
6
PR merge metrics
No merged PRs in 30d

Description

This issue is a result of a Codex global code scan of deepmodeling/deepmodeling_sphinx at commit 156679fe55fc61e8ec3b1e9be8a45fde3567b9cb.

Problem

`banner.js` toggles `body.no-scroll` when the mobile menu opens and closes, but `banner.css` does not define a `body.no-scroll` rule. The class is therefore inert and does not prevent background page scrolling.

Code references:

https://github.com/deepmodeling/deepmodeling_sphinx/blob/156679fe55fc61e8ec3b1e9be8a45fde3567b9cb/deepmodeling_sphinx/banner.js#L11-L17
https://github.com/deepmodeling/deepmodeling_sphinx/blob/156679fe55fc61e8ec3b1e9be8a45fde3567b9cb/deepmodeling_sphinx/banner.js#L43-L51
https://github.com/deepmodeling/deepmodeling_sphinx/blob/156679fe55fc61e8ec3b1e9be8a45fde3567b9cb/deepmodeling_sphinx/banner.css#L207-L230

Impact

On small screens, opening the fixed mobile menu can still allow the page behind it to scroll. This makes the overlay feel unstable and can move the underlying document while the menu is open.

Suggested fix

Add an explicit rule such as `body.no-scroll { overflow: hidden; }`, and consider the iOS/touch-scrolling behavior if the menu content itself needs to scroll.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.