ng-idle
在IE9和IE10中无法正常工作。如果您将鼠标指针保留在页面上,则不会被视为用户处于非活动状态。只有当您将鼠标指针移至页面外部时,才能正常工作。
请提供解决方案。
使用以下网址进行检查 http://hackedbychinese.github.io/ng-idle/
ng-idle
在IE9和IE10中无法正常工作。如果您将鼠标指针保留在页面上,则不会被视为用户处于非活动状态。只有当您将鼠标指针移至页面外部时,才能正常工作。
请提供解决方案。
使用以下网址进行检查 http://hackedbychinese.github.io/ng-idle/
替换
$document.find('body').on(options.interrupt, function(event) {
svc.interrupt();
}
使用以下代码在angular-idle.js中:
$document.find('body').on(options.interrupt, function(event) {
if (event.type !== 'mousemove' || (event.movementX || event.movementY)) {
svc.interrupt();
}
});
ng-idle
的interrupt()
方法配置事件。if (navigator.userAgent.toLowerCase().indexOf("msie") > 0) {
// Code for Internet Explorer because ng-idle doesn't stop listening mousemove event.
IdleProvider.interrupt('keydown DOMMouseScroll mousewheel mousedown touchstart touchmove scroll');
}
else {
IdleProvider.interrupt('mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove scroll');
}