Skip to content
Browse files

Merge pull request #61 from bartsidee/master

Prefer keyCode above which in native events
  • Loading branch information...
2 parents 4450b89 + 09275cf commit 16eae56548b96a7540841163393e3ef7dbf9818a @rvagg rvagg committed Mar 9, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 bean.js
  2. +1 −1 src/bean.js
View
2 bean.js
@@ -150,7 +150,7 @@
if (isNative) { // we only need basic augmentation on custom events, the rest is too expensive
if (type.indexOf('key') !== -1) {
props = keyProps
- result.keyCode = event.which || event.keyCode
+ result.keyCode = event.keyCode || event.which
} else if (mouseTypeRegex.test(type)) {
props = mouseProps
result.rightClick = event.which === 3 || event.button === 2
View
2 src/bean.js
@@ -141,7 +141,7 @@
if (isNative) { // we only need basic augmentation on custom events, the rest is too expensive
if (type.indexOf('key') !== -1) {
props = keyProps
- result.keyCode = event.which || event.keyCode
+ result.keyCode = event.keyCode || event.which
} else if (mouseTypeRegex.test(type)) {
props = mouseProps
result.rightClick = event.which === 3 || event.button === 2

0 comments on commit 16eae56

Please sign in to comment.
Something went wrong with that request. Please try again.