From 13b9d3efb0c46aa98572f7fe2829755af5481dbb Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 12 Feb 2015 23:01:20 +0300 Subject: [PATCH] Fixed idle mousemove --- app/js/lib/ng_utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/js/lib/ng_utils.js b/app/js/lib/ng_utils.js index f7490a4c..58f9134c 100644 --- a/app/js/lib/ng_utils.js +++ b/app/js/lib/ng_utils.js @@ -823,6 +823,10 @@ angular.module('izhukov.utils', []) function onEvent (e) { // console.log('event', e.type); if (e.type == 'mousemove') { + var e = e.originalEvent || e; + if (e && e.movementX === 0 && e.movementY === 0) { + return; + } $($window).off('mousemove', onEvent); } var isIDLE = e.type == 'blur' || e.type == 'timeout' ? true : false;