This issue is a result of a Codex global code scan of deepmodeling/deepmodeling_sphinx at commit 156679f.
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:
|
element.addEventListener("click", function (e) { |
|
e.preventDefault(); |
|
document.querySelector(".mobile-main-menu").classList.add("open"); |
|
document.body.classList.add("no-scroll"); |
|
|
|
mobileMenu.listenForResize(); |
|
}); |
|
close: function () { |
|
document.querySelector(".mobile-main-menu").classList.remove("open"); |
|
document.body.classList.remove("no-scroll"); |
|
|
|
// Remove the resize event listener |
|
if (this.resizeHandler) { |
|
window.removeEventListener("resize", this.resizeHandler); |
|
this.resizeHandler = null; |
|
} |
|
.mobile-main-menu { |
|
display: none; |
|
} |
|
|
|
.mobile-main-menu.open { |
|
background: |
|
radial-gradient( |
|
circle at top left, |
|
rgba(37, 99, 235, 0.28), |
|
transparent 24rem |
|
), |
|
#0f172a; |
|
display: block; |
|
height: 100%; |
|
left: 0; |
|
margin-left: auto; |
|
margin-right: auto; |
|
min-height: 100%; |
|
position: fixed; |
|
right: 0; |
|
top: 0; |
|
width: 100%; |
|
z-index: 99999; |
|
} |
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.
This issue is a result of a Codex global code scan of deepmodeling/deepmodeling_sphinx at commit 156679f.
Problem
banner.jstogglesbody.no-scrollwhen the mobile menu opens and closes, butbanner.cssdoes not define abody.no-scrollrule. The class is therefore inert and does not prevent background page scrolling.Code references:
deepmodeling_sphinx/deepmodeling_sphinx/banner.js
Lines 11 to 17 in 156679f
deepmodeling_sphinx/deepmodeling_sphinx/banner.js
Lines 43 to 51 in 156679f
deepmodeling_sphinx/deepmodeling_sphinx/banner.css
Lines 207 to 230 in 156679f
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.