ganlanyuan / tiny-slider

Vanilla javascript slider for all purposes.
MIT License
5.26k stars 786 forks source link

Error in Console: Added non-passive event listener to a scroll-blocking 'touchstart' event. #715

Open tilllt opened 3 years ago

tilllt commented 3 years ago

Issue description:
Error in Console: Added non-passive event listener to a scroll-blocking 'touchstart' event. Just switched from swiperjs to tiny-slider and it works much better for the vertical slider i needed. I am only wondering about the error in the console and how (or if) it should be fixed.

Demo link/slider setting:

<script>
        var slider = tns({
                    'container': '.my-slider',
                    'items': 1,
                    'axis': 'vertical',
                    'touch': true,
                    'mouseDrag': true,
                    'arrowKeys': false,
                    'autoHeight': true,
                    'preventScrollOnTouch': true,
                    'controls': false,
                    'navPosition': 'bottom',
                    'autoplay': true,
                    'autoplayPosition': 'bottom',
                    'autoplayButtonOutput': false,
                    'autoplayTimeout': 10000
                    });
</script>

Tiny-slider version: 2.9.2 Browser name && version: Chrome Version 92.0.4515.159 (Official Build) (64-bit) OS name && version: Windows 10

jro3 commented 3 years ago

'preventScrollOnTouch': false Try that and see.

tilllt commented 3 years ago

Well, I can try if that makes the console error go away... but i do want that feature to be enabled, since the website should not scroll when people try to swipe through the news slider...