naver / egjs-flicking

🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.

Home Page:https://naver.github.io/egjs-flicking/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When I switch to mobile mode in the browser the slider stops working

fernandogiroto opened this issue · comments

Description

When I'm in browser mode the slider works normally. However, when I switch to mobile mode in the browser, the slider stops working. I thought there might be something wrong with my settings, but the same thing happens in the examples in the documentation. If I am, for example, in mobile mode in the browser and refresh the page, then it works again. But if I change from one to the other this happens.

flickity.webm

Steps to check or reproduce

I tested using pagination and with pagination it works. In other words, if I'm on the browser screen it's working, then I switch to the mobile version in the browser and the scroll stops working but if I click on the pagination bullets the scroll works.

Grabacion.de.pantalla.desde.17-06-24.15.41.15.webm

Hello @fernandogiroto.

When a Flicking instance is initialized, the inputType option determines whether it recognizes mouse events or touch events from the user.

This option defaults to ["touch", "mouse"] and will recognize either mouse events or touch events when the Flicking instance is initialized, so it may not work if the type of event changes in the middle of the process, such as changing the browser's mobile device mode.

However, this situation doesn't happen in real usage.
If you need to consider this, you could use ["pointer"], but that might not work in browsers that don't support pointer events.

Thanks for the explanation. Worked perfectly.