Open mihalikv opened 1 year ago
The lazy init seems to work fine for me, if you click elsewhere in the document.
The reason the Jsfiddle does not navigate is unrelated:
Refused to display 'https://www.google.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
I changed jsfiddle the link in issue https://jsfiddle.net/v7axdwLm/2/
https://github.com/leongersen/noUiSlider/assets/10236315/d8d0efb5-cc66-41a8-8c5a-f6845bcf2c3e
Recording from real iPhone. You basically need to click twice.
I don't think that's related to noUiSlider.
Yeah it's not related to noUiSlider, it's more like noUiSlider is affected by some of the conventions of safari/iPhone. When you add an element dynamically and then attach the event to it, it will affect clicking anywhere else on the page.
Here is minimal reproduction without noUIslider: https://jsfiddle.net/1ktyhfev/10/ and here is the "fixed" version with setTimeout: https://jsfiddle.net/1ktyhfev/11/
I test it also with "fix" in noUiSlider and it works for me
Unfortunately, I cannot find any related articles about this kind of bug. Maybe this is related in some way https://github.com/angular/angular/issues/50230
Expected Behavior
When I click on "Go to google", browser should redirect to the root.cz.
Current Behavior
When I click on "Go to google", I am still on same page.
Steps to Reproduce
https://jsfiddle.net/v7axdwLm/2/ -> Click on link on iPhone
This is very specific case when there is some custom event listener on document but I can't figured out why noUiSlider should break simple link redirect. Maybe my custom init script is wrong...
Context (Environment)
Tested on real device and also in browserstack
Possible Implementation
I tried to change code of adding event listeners in various way and this change helped but it definitely break rest of the lib