vue-virtual-scroller icon indicating copy to clipboard operation
vue-virtual-scroller copied to clipboard

Unable to make elements sticky due to overflow: hidden under the hood of DynamicScroller

Open ghost opened this issue 2 years ago • 3 comments
trafficstars

Describe the bug

I create a table where each row is wrapped by DynamicScrollerItem. My task is to do a sticky column. I use position: sticky to make specific cells sticky.

The problem is position: sticky doesn't work if any of sticky element parents have overflow: hidden.

Element with class vue-recycle-scroller__item-wrapper which is under the hood of vue-virtual-scroller has overflow: hidden that makes impossible to make sticky elements inside it.

Reproduction

Create simple table using DynamicScroller. Try to make any column sticky.

Expected result: Cells of sepcific column are sticky.

Actual result: position sticky doesn't work due to overflow: hidden under the hood of vue-virtual-scroller.

System Info

Not required.

Used Package Manager

npm

Validations

ghost avatar Jun 27 '23 09:06 ghost

There is an explanation why position: sticky doesn't work: https://stackoverflow.com/questions/43909940/why-does-overflowhidden-prevent-positionsticky-from-working

ghost avatar Jun 27 '23 09:06 ghost

There is official doc related to this: https://www.w3.org/TR/css-position-3/#sticky-pos

ghost avatar Jun 27 '23 09:06 ghost