Skip to content

Recent Cards - fix for slider on mobile not working

Customisation
23 3 6.3k 1
  • @phenomlab I changed the code to this:

    window.addEventListener("load", () => {
        // CHROME
        if (navigator.userAgent.indexOf("Chrome") != -1) {
            console.log("Google Chrome");
            $(window).on('action:ajaxify.end', function(data) {
                $('.carousel-mode').bxSlider({
                    auto: true,
                    autoControls: true,
                    stopAutoOnClick: true,
                    pager: false,
                    keyboardEnabled: true,
                    touchEnabled: false
                });
            });
        } else {
            console.log("Others");
            $(window).on('action:ajaxify.end', function(data) {
                $('.carousel-mode').bxSlider({
                    auto: true,
                    autoControls: true,
                    stopAutoOnClick: true,
                    pager: false,
                    keyboardEnabled: true,
                    touchEnabled: true
                });
            });
        }
    });
    

    with “auto: false” edit…

    and it is still working with firefox and safari; but not with google chrome.

    @crazycells That’s correct. Because of the bug in Chrome, we have to disable touchEnabled

  • great topic, I will test than soon as possible 😉

  • great topic, I will test than soon as possible 😉

    @DownPW No issues. Thanks to the Google Chrome “bug”, it does have some restrictions, but works fine other than that. I have an odd issue where it doesn’t work on Firefox mobile, but works fine on Firefox desktop.


Related Topics