What version of cordova are you using?
This should be fixed now in the latest version, but if you do not want to update the project, you can change the replaceNavigator function so that it is in the cordova.js file (everything else is new)
function replaceNavigator(origNavigator) { var CordovaNavigator = function() {}; CordovaNavigator.prototype = origNavigator; var newNavigator = new CordovaNavigator(); // This work-around really only applies to new APIs that are newer than Function.bind. // Without it, APIs such as getGamepads() break. if (CordovaNavigator.bind) { for (var key in origNavigator) { if (typeof origNavigator[key] == 'function') { newNavigator[key] = origNavigator[key].bind(origNavigator); } else { (function(k) { Object.defineProperty(newNavigator, k, { get: function() { return origNavigator[k]; }, configurable: true, enumerable: true }); })(key); } } } return newNavigator; }
source share