-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Provide a general summary of the issue here
// Prevent scrolling the window. if (!scrollable || scrollable === document.documentElement || scrollable === document.body) { e.preventDefault(); return; }
The issue mainly occurs in this section of the code: when I open a full-screen dialog on an iPad and use usePreventScroll({isDisable: !isOpen}), the DOM element retrieved by scrollable here is not the body—it’s the dialog instead. This causes the judgment here to fail, and scrolling cannot be disabled properly.
🤔 Expected Behavior?
disable scroll can be work
😯 Current Behavior
disable scroll can not work
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
when I open a full-screen dialog on an iPad and use usePreventScroll({isDisable: !isOpen}), the DOM element retrieved by scrollable here is not the body—it’s the dialog instead. This causes the judgment here to fail, and scrolling cannot be disabled properly.
Version
latest
What browsers are you seeing the problem on?
Safari
If other, please specify.
No response
What operating system are you using?
macos
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response