summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Campbell <iamcraigcampbell@gmail.com>2013-08-30 14:51:12 -0400
committerCraig Campbell <iamcraigcampbell@gmail.com>2013-08-30 14:51:12 -0400
commita1ca49d46333f445c4e7996ab9fcc68ef2baa66c (patch)
tree04c59c1a8d15d9b1dd57b10585615ad696d8d5ac
parent9665b738b3ddb8f99eadc967d6675f6e83cc034d (diff)
downloadmousetrap-a1ca49d46333f445c4e7996ab9fcc68ef2baa66c.zip
mousetrap-a1ca49d46333f445c4e7996ab9fcc68ef2baa66c.tar.gz
mousetrap-a1ca49d46333f445c4e7996ab9fcc68ef2baa66c.tar.bz2
Check isContentEditable property. Fixes #138
This may break support for content editable in Firefox 3 or some version of IE, but it should be fine.
-rw-r--r--mousetrap.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/mousetrap.js b/mousetrap.js
index 7260432..5472cfb 100644
--- a/mousetrap.js
+++ b/mousetrap.js
@@ -912,7 +912,7 @@
}
// stop for input, select, and textarea
- return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || (element.contentEditable && element.contentEditable == 'true');
+ return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;
},
/**