keithamus / jwerty

⌨ Awesome handling of keyboard events
http://keithamus.github.io/jwerty
Other
1.21k stars 109 forks source link

Skip keyCode check in is() when keyCode does not exist on event object #62

Open brettpostin opened 9 years ago

brettpostin commented 9 years ago

In some scenarios (e.g. Ctrl-Click) in Firefox and IE the event object does not have the keyCode property. Therefore the loop always returns false when comparing properties with the jwertycode object.

This check skips the comparison if the property is missing on the event object.

keithamus commented 9 years ago

Hey @brettpostin thanks for the PR! Could you explain what this solves, with code examples please?