Weird behaviour and handles moving together on some mobile devices #1255
Open
Description
I have an Android app with a webView in it and one of my testers who has some kind of Huawei device has a problem using the slider (see video below). I couldn't reproduce the bug on either of my devices. I tried it on Pixel, Samsung, iPhone, iPhone simulator and desktop, but it works fine for me. What could be the problem and is there anything I can do on my end to fix this? Maybe adding a margin so the handles won't jump together that much, but it's still weird. (The problem appears on a Huawei device, so maybe the reason is the absence of Chrome?)
Here's the code snippet about how I create the slider:
sliderElement = document.getElementById(sliderDiv);
ProductList.slider = noUiSlider.create(sliderElement, {
start: [sliderData.min, sliderData.max],
connect: true,
range: {
'min': sliderData.min,
'max': sliderData.max
}
});
ProductList.slider.on('change', function() {
sliderResult = ProductList.slider.get();
sliderMin = parseInt(sliderResult[0]);
sliderMax = parseInt(sliderResult[1]);
$('.slider-from').html(sliderMin + '%');
$('.slider-to').html(sliderMax + '%');
ProductList.search();
});