moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
323 stars 129 forks source link

Idle detection not consistent in IE11 #34

Open TheSkylArk opened 7 years ago

TheSkylArk commented 7 years ago

I'm submitting a ... (check one with "x")

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/HackedByChinese/ng2-idle/blob/master/CONTRIBUTING.md#getting-help

Current behavior When using IE11 moving the mouse does not stop idle. (Using DEFAULT_INTERRUPTSOURCES)

Expected behavior On other browsers tested (Chrome, Firefox and Edge) moving the mouse stops idle timeout

Minimal reproduction of the problem with instructions Start up ng2-idle example https://hackedbychinese.github.io/ng2-idle in IE11. Wait for timeout countdown to start. Moving mouse does not stop countdown.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

jackjamieson commented 7 years ago

The issue seems to be from the filter check for mousemove

if (event.type === 'mousemove'
            && ((event.originalEvent && event.originalEvent.movementX === 0 &&
                event.originalEvent.movementY === 0)
                || (event.movementX !== void 0 && !event.movementX || !event.movementY))) {
            return true;
        }

in documentinterruptsource.ts

IE does not have the event.movementX or event.movementY property so I think this is causing the mousemove event to always be filtered.

JackMcHale commented 7 years ago

This is an issue for an app we're writing as well. For IE users on windows 8 or earlier, it causes issues (even with IE 11).

dgroh commented 6 years ago

+1

mouse pointer spnning around on IE

henrysachs commented 6 years ago

while the pull Request isn't approved take a look into the chat in it where a kind of workaround is provided.