try to nice unload on phones
This commit is contained in:
@@ -183,11 +183,12 @@ let app = {
|
||||
const self = this;
|
||||
setTimeout(this.showApp);
|
||||
this.loadSounds();
|
||||
document.addEventListener("visibilitychange", function () {
|
||||
document.addEventListener("visibilitychange", () => {
|
||||
if (!document.hidden) {
|
||||
self.onFocus();
|
||||
}
|
||||
});
|
||||
document.addEventListener("beforeunload", self.onFocus);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user