Open pmichna opened 7 years ago
Same here with chrome 55.0.2883.87 . Whenever the webpage lost focus (for example if i click on the browser developer's tools) the slider stops (the onStop event is fired). If i'll find out what the problem could be, i'd let you know...
ok, i've found out a workaround... sorry, i don't know how to commit a change on github...
At line 412 after
nextNavSelector: '',
add this line
stopOnBlur: true,
At line 650 change this
window.onblur = function() {
this.stop();
}.bind(this);
to this:
if (this.settings.stopOnBlur) {
window.onblur = function() {
this.stop();
}.bind(this);
}
USAGE Now if you want the slider to keep playing when you change the tab, initialize your slider with the option stopOnBlur set to false:
var slider = new IdealImageSlider.Slider({
selector: '#sliderHP',
stopOnBlur: false,
});
I'm using ideal image slider 1.5.1.
When I open my page, everything is fine. However, when I change browser tab, then go back to the tab with my page, the slides stop changing. There are no errors in the JS console. I checked the issue with Chrome and Firefox.
What could be the problem?