leongersen / noUiSlider

noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies.
https://refreshless.com/nouislider/
MIT License
5.64k stars 658 forks source link

why don't move range cursor whenever click or drag value on line #1265

Closed monteseniordev closed 4 weeks ago

monteseniordev commented 4 months ago

I use noUiSlider 13.1.5 in my project. there is very strange issue. I implemented all functions and work well on my workspace. but after deploy source to other domain, whenever give action click or drag on slider, don't move range cursor. in other ways, slider don't work for set updated value.

if I use variable maxPrice, occur above issue.

noUiSlider.create(slider, {
                start: [ 0, maxPrice ],
                connect: true,
                step: 50,
                margin: 200,
                range: {
                    'min': 0,
                    'max': **maxPrice**
                },
                tooltips: true,
                format: wNumb({
                    decimals: 0,
                    prefix: ' AED '
                })
            });

but if I use number such as 1000, all work well.

noUiSlider.create(slider, {
                start: [ 0, maxPrice ],
                connect: true,
                step: 50,
                margin: 200,
                range: {
                    'min': 0,
                    'max': **1000**
                },
                tooltips: true,
                format: wNumb({
                    decimals: 0,
                    prefix: ' AED '
                })
            });

why happened this? work error

this code work well in my workspace. very very strange

leongersen commented 4 weeks ago

I can't really answer this with this information, console.log maxPrice and see what is happening.