-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Provide a general summary of the issue here
When a horizontal scrollable page (a page with a horizontal scrollbar) is prevented from scrolling, a resize event should be triggered on the visual viewport since the horizontal scrollbar is no longer visible. However, with Chrome, the resize event is only triggered after the page scroll is restored.
The real-world example is that we build a drawer component with a height that matches the --visual-viewport-height.
I am not sure if this is a browser issue. It only happens with Chrome.
π€ Expected Behavior?
When a drawer is opened, its height should match the entire window.
π― Current Behavior
Until another resize event is triggered, the drawer's height is incorrect.
π Possible Solution
No response
π¦ Context
No response
π₯οΈ Steps to Reproduce
https://stackblitz.com/edit/rac-visual-viewport-prevent-scroll?file=src%2FApp.tsx,src%2Findex.css
Screen.Recording.2025-12-22.at.4.49.56.PM.mov
Version
1.14.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
π§’ Your Company/Team
No response
π· Tracking Issue
No response