And so, it appears that the bug only impacts Google Chrome, so we’ll have to test the browser first to ensure that if it is indeed Chrome, we will need to disable the touchEnabled
setting. This code below will do exactly that. If anything other than Chrome is detected, we set touchEnabled: true
(which is actually the default anyway)
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
});
});
}
});