Embrace what the web exposes. Allowing document scrolling underneath is distinctly the lesser of two evils. With a bit of effort, you can block scrolling underneath in almost all cases, and I reckon that’s good enough and much better than what there is currently. (Also try asking browser makers, “y’know this ‘top layer’ thing you made for <dialog> modal presentation and fullscreen? Wouldn’t it be nice if we could prevent scrolling underneath a ::backdrop?”)
I've been interested in re-implementing smooth scrolling in JS to mimic native but.. Even if you hit solid native refresh at all time, I feel you'd have to switch your entire site to JS controlled scrolling for consistency and even then the scroll feel might not match native scroll on other pages per system settings.
It's a bit of a rabbit hole.
Is there a limitation in CSS preventing it?
This runs counter to the behavior of it being anchored to a parent container.
-1-----------
| |
| -2--- |
| | D | |
| ----- |
| |
-------------
If you attach the dropdown options to the inner container (2), they are cropped.If you attach the dropdown options to the outer container (1), they don't scroll with the rest of their component (D).
----
Non-native dropdowns in general are handicapped.
For Windows/MacOS/Linux, native dropdowns can exceed the bounds of even the OS window. There is no CSS equivalent of this behavior.