ten1seven / what-input

A global utility for tracking the current input method (mouse/pointer, keyboard or touch).
https://ten1seven.github.io/what-input
MIT License
1.36k stars 77 forks source link

IE Not Working #14

Closed realalexhomer closed 8 years ago

realalexhomer commented 8 years ago

Hey, I'm curious if anyone has gotten this to work on IE? I've tested on IE 9 and IE 10 to no avail. Its not a polyfill error as there is no error being thrown.

The script is initializing and the body is getting a mouse data attribute, but keyboard events are not causing this attribute to change.

If someone else can verify its not just me I'd be happy to fix it and submit a pr.

ten1seven commented 8 years ago

Hey @realalexhomer, I can confirm that this works in IE8+ (just re-checked in my virtual machines). If you use the demo page is it still not working?

realalexhomer commented 8 years ago

Thanks, sorry to bother you, it does appear to be working. I must have an event listener buried somewhere that is not propagating changes for ie for some reason.

ten1seven commented 8 years ago

Happy to help if I can!

The keyboard events are bound on the body and document. If you're using event.stopPropagation() on keyboard events on elements in the page or are binding to the <body> and using event.preventDefault() that could be interfering with what input.