Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix page-reloads on iOS (#2782) #2925

Merged
merged 1 commit into from Aug 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions vendor/wakelock/wakelock.js
Expand Up @@ -47,9 +47,9 @@ function iOSWakeLock() {
this.request = function() {
if (!timer) {
timer = setInterval(function() {
window.location = window.location;
window.location.href = '/';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this fix? this assumes a page lives at the root, right?

a better wakelock imo would be to play an empty autoplay audio track on loop (but would have to test to guarantee no perf impact).

setTimeout(window.stop, 0);
}, 30000);
}, 15000);
}
}

Expand Down