Merge pull request #3401 from cmgustavo/bug/cordova-resume
Fix resume event on mobile
This commit is contained in:
commit
beb877e7b6
1 changed files with 9 additions and 2 deletions
|
|
@ -28,13 +28,20 @@ angular.element(document).ready(function() {
|
|||
|
||||
document.addEventListener('pause', function() {
|
||||
if (!window.ignoreMobilePause) {
|
||||
window.location = '#/';
|
||||
setTimeout(function() {
|
||||
window.location = '#/cordova/pause/';
|
||||
}, 100);
|
||||
}
|
||||
setTimeout(function() {
|
||||
window.ignoreMobilePause = false;
|
||||
}, 100);
|
||||
}, false);
|
||||
|
||||
document.addEventListener('resume', function() {
|
||||
if (!window.ignoreMobilePause) {
|
||||
window.location = '#/cordova/resume/';
|
||||
setTimeout(function() {
|
||||
window.location = '#/cordova/resume/';
|
||||
}, 100);
|
||||
}
|
||||
setTimeout(function() {
|
||||
window.ignoreMobilePause = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue