Skip to content

Commit

Permalink
Manually fire enable event on iOS WebKit after deviceready event
Browse files Browse the repository at this point in the history
  • Loading branch information
katzer committed Jan 19, 2017
1 parent e2a8ab0 commit 0ed766a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions www/background-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,10 @@ channel.onCordovaReady.subscribe(function () {
exports.setDefaults({});
});
});

// Called after 'deviceready' event
channel.deviceready.subscribe(function () {
if (window.webkit && exports.isEnabled()) {
exports.fireEvent('enable');
}
});

0 comments on commit 0ed766a

Please sign in to comment.