naver / egjs-conveyer

Conveyer adds Drag gestures to your Native Scroll.
https://naver.github.io/egjs-conveyer/
MIT License
110 stars 8 forks source link

scrollPos works only after window resize #44

Open Nickonimus opened 1 year ago

Nickonimus commented 1 year ago

Hi scrollPos works for me only after window resize, is this a bug?

malangfox commented 1 year ago

Hello @Nickonimus.

We have tried to reproduce the issue you left, but it works fine without changing the window size. You can check out this demo using scrollPos.

We would like to know how you are using scrollPos, can we check your implementation?

Nickonimus commented 1 year ago

Thank you!

After clicking 'projects', you can scroll down to open infinite grid again, i used scrollPos for this. But to make it work i had to use strange fix. Just replaced two event listeners from 'resize' to 'mouseover' inside conveyer's source code.

malangfox commented 9 months ago

@Nickonimus

Our @egjs/conveyer 1.7.0 version added the useResizeObserver to ConveyerOptions, which updates the status after the element's size changes. Can you try updating our package to the latest version and using this option to true fixes this issue?