Pace.js keeps loading while on low battery mode
john-khawaja opened this issue · comments
John Khawaja commented
Hi, the pace.js loader will keep loading while IOS devices are on low battery mode.
Any fix?
JDM Digital commented
I've seen this too. What we've used in the past is a timeout function to detect that it's just taking WAY too long.
Example: Pace.on('hide', function() { setTimeout(function () { $('.pace').remove(); }, 2000); });
So, that'll remove Pace if it's taking more than 2 seconds--which we're assuming isn't the case. Instead, someone's iOS device is in power save mode.
It's a workaround, not a fix.
Stéphane commented
Another dirty workaround : you can detect low power mode using this.