Viewport doesn't resize when <details> element is expanded
See original GitHub issueWhen clicking the <summary>
element inside of a <details>
element, OverlayScrollbars doesn’t recognize that the page size has changed and requires a deferred hard update to show the correct scrollbar visibility/size.
Minimal example (with code to get it working commented out): https://stackblitz.com/edit/overlayscrollbars-details?file=index.js
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Why doesn't body width expand to the width of its child elements
It came to my attention that the body doesn't automatically resize to the width of its children. This becomes an issue because of...
Read more >Viewport meta tag - HTML: HyperText Markup Language | MDN
This article describes how to use the "viewport" tag to control the viewport's size and shape.
Read more >aspect-ratio - CSS-Tricks
The CSS property aspect-ratio lets you create boxes that maintain proportional dimensions where the height and width of a box are calculated ...
Read more >Resize and Expand to 100% Height - Kendo UI Grid for jQuery
An example on how to resize and expand it to 100% height when the parent container or browser window are resized too.
Read more >5. CSS layout: tricks and layout techniques - Books at mixu.net
Sizing-related techniques allow you to define how a particular element should be sized; how it should grow and how it should shrink as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good day!
Thanks for your very clear example. I’ve tested it, and this is happening because the used
MutationObserver
doesn’t recognize a change, because it’s not listening on the correct property which isopen
. I haven’t tested OverlayScrollbars with adetails
element inside yet, so thanks for this report!Glad I could help!