dmauro / Keypress

A keyboard input capturing utility in which any key can be a modifier key.
http://dmauro.github.io/Keypress/
Apache License 2.0
3.18k stars 313 forks source link

Don't override Array.prototype #18

Closed djsmith42 closed 10 years ago

djsmith42 commented 10 years ago

We still use Array.filter if present, but we don't replace it if absent because overriding Array.prototype interferes with other libraries that make assumptions about it.

Also rebuild keypress.js using coffe-compiler.sh

This change fixes a bug in my AngularJS application that was introduced by Keypress.js's Array.prototype.

dmauro commented 10 years ago

Cool, looks like it just needs to call _filter instead of Array.filter in a few places. Thanks :)

djsmith42 commented 10 years ago

Woops! My commit was supposed to include that change. Let me close this PR and get you a new one with those changes.