react-input-mask
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -232,3 +232,5 @@ // https://github.com/sanniassin/react-input-mask | ||
onKeyDown: function(event) { | ||
var hasHandler = typeof this.props.onKeyPress === "function"; | ||
if (event.ctrlKey || event.metaKey) { | ||
this.props.onKeyDown(event); | ||
return; | ||
@@ -267,3 +269,3 @@ } | ||
if (typeof this.props.onKeyDown === "function") { | ||
if (hasHandler) { | ||
this.props.onKeyDown(event); | ||
@@ -289,3 +291,7 @@ } | ||
var key = event.key; | ||
var hasHandler = typeof this.props.onKeyPress === "function"; | ||
if (key === "Enter" || event.ctrlKey || event.metaKey) { | ||
if (hasHandler) { | ||
this.props.onKeyPress(event); | ||
} | ||
return; | ||
@@ -292,0 +298,0 @@ } |
{ | ||
"name": "react-input-mask", | ||
"description": "Masked input component for React", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"homepage": "https://github.com/sanniassin/react-input-mask", | ||
@@ -19,4 +19,6 @@ "license": "MIT", | ||
}, | ||
"main": "build/InputElement.js", | ||
"scripts": { | ||
"build": "babel InputElement.js -d build" | ||
"build": "babel InputElement.js -d build", | ||
"prepublish": "npm run build" | ||
}, | ||
@@ -23,0 +25,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29877
4
802