Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update mousetrap.js version and bump

  • Loading branch information...
commit 97c2caa6451591faea06d3d029eb08f3ce68a095 1 parent 181b60b
@kugaevsky authored
Showing with 10 additions and 11 deletions.
  1. +6 −1 CHANGELOG.md
  2. +4 −10 vendor/assets/javascripts/mousetrap.js
View
7 CHANGELOG.md
@@ -1,7 +1,12 @@
-## v0.0.12.wip
+## v0.0.13.wip
* [] Add moustrap extensions generator
+
+## v0.0.12
+
+* minor turbolinks compatibility improvements
* fix bug with numbers binding in data attributes
+* update mousetrap.js to 1.4.5
## v0.0.11
View
14 vendor/assets/javascripts/mousetrap.js
@@ -17,10 +17,10 @@
* Mousetrap is a simple keyboard shortcut library for Javascript with
* no external dependencies
*
- * @version 1.4.4
+ * @version 1.4.5
* @url craig.is/killing/mice
*/
-(function() {
+(function(window, document, undefined) {
/**
* mapping of special keycodes to their corresponding keys
@@ -246,12 +246,6 @@
character = character.toLowerCase();
}
- // String.fromCharCode(32) for spacebar returns " " for the
- // character name, make sure it matches the mousetrap name
- if (character == ' ') {
- return 'space';
- }
-
return character;
}
@@ -918,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;
},
/**
@@ -934,4 +928,4 @@
if (typeof define === 'function' && define.amd) {
define(Mousetrap);
}
-}) ();
+}) (window, document);
Please sign in to comment.
Something went wrong with that request. Please try again.