Skip to content

Commit

Permalink
Merge branch 'develop' into pr/93
Browse files Browse the repository at this point in the history
  • Loading branch information
grbsk committed Jun 19, 2015
2 parents 8aebfd6 + a98b689 commit 608db5e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
21 changes: 9 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
"user",
"session"
],
"main": [
"angular-idle.js",
"angular-idle.min.js",
"angular-idle.map"
],
"main": "angular-idle.js",
"scripts": {
"test": "grunt test"
},
Expand All @@ -33,26 +29,27 @@
"angular": "^1.2.0"
},
"devDependencies": {
"angular-mocks": "^1.2.0",
"grunt": "~0.4.2",
"grunt-bump": "0.0.13",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-uglify": "~0.3.2",
"grunt-karma": "0.6.2",
"karma": "~0.10.9",
"grunt-karma": "^0.11.0",
"jquery": "^2.0.3",
"karma": "^0.12.36",
"karma-chrome-launcher": "~0.1.2",
"karma-coffee-preprocessor": "~0.1.2",
"karma-coffee-preprocessor": "^0.2.1",
"karma-firefox-launcher": "~0.1.3",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.5",
"karma-phantomjs-launcher": "~0.1.1",
"karma-phantomjs-launcher": "^0.2.0",
"karma-requirejs": "~0.2.1",
"karma-script-launcher": "~0.1.0",
"matchdep": "~0.3.0",
"requirejs": "~2.1.10",
"angular-mocks": "^1.2.0",
"jquery": "^2.0.3"
"phantomjs": "^1.9.17",
"requirejs": "~2.1.10"
}
}
16 changes: 14 additions & 2 deletions src/idle/idle.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,20 @@ angular.module('ngIdle.idle', ['ngIdle.keepalive', 'ngIdle.localStorage'])
}
};

$document.find('body').on(options.interrupt, function() {
svc.interrupt();
$document.find('body').on(options.interrupt, function(event) {
/*
note:
webkit fires fake mousemove events when the user has done nothing, so the idle will never time out while the cursor is over the webpage
Original webkit bug report which caused this issue:
https://bugs.webkit.org/show_bug.cgi?id=17052
Chromium bug reports for issue:
https://code.google.com/p/chromium/issues/detail?id=5598
https://code.google.com/p/chromium/issues/detail?id=241476
https://code.google.com/p/chromium/issues/detail?id=317007
*/
if (event.type !== 'mousemove' || (event.movementX || event.movementY)) {
svc.interrupt();
}
});

var wrap = function(event) {
Expand Down

0 comments on commit 608db5e

Please sign in to comment.