react-input-mask
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -19,2 +19,9 @@ "use strict"; | ||
lastCaretPos: null, | ||
// getDOMNode is deprecated but we need it to be compatible with React 0.12 | ||
findDOMNode: function findDOMNode() { | ||
if (React.findDOMNode) { | ||
return React.findDOMNode(this); | ||
} | ||
return this.getDOMNode(); | ||
}, | ||
getPrefix: function getPrefix() { | ||
@@ -169,3 +176,3 @@ var prefix = ""; | ||
getSelection: function getSelection() { | ||
var input = this.getDOMNode(); | ||
var input = this.findDOMNode(); | ||
var start = 0; | ||
@@ -195,3 +202,3 @@ var end = 0; | ||
getCaretPos: function getCaretPos() { | ||
var input = this.getDOMNode(); | ||
var input = this.findDOMNode(); | ||
var pos = 0; | ||
@@ -226,3 +233,3 @@ | ||
if (this.isMounted()) { | ||
input = this.getDOMNode(); | ||
input = this.findDOMNode(); | ||
setPos(); | ||
@@ -235,3 +242,3 @@ setTimeout(setPos, 0); | ||
isFocused: function isFocused() { | ||
return document.activeElement === this.getDOMNode(); | ||
return document.activeElement === this.findDOMNode(); | ||
}, | ||
@@ -238,0 +245,0 @@ parseMask: function parseMask(mask) { |
@@ -13,2 +13,9 @@ // https://github.com/sanniassin/react-input-mask | ||
lastCaretPos: null, | ||
// getDOMNode is deprecated but we need it to be compatible with React 0.12 | ||
findDOMNode: function() { | ||
if (React.findDOMNode) { | ||
return React.findDOMNode(this); | ||
} | ||
return this.getDOMNode(); | ||
}, | ||
getPrefix: function() { | ||
@@ -157,3 +164,3 @@ var prefix = ""; | ||
getSelection: function() { | ||
var input = this.getDOMNode(); | ||
var input = this.findDOMNode(); | ||
var start = 0; | ||
@@ -184,3 +191,3 @@ var end = 0; | ||
getCaretPos: function() { | ||
var input = this.getDOMNode(); | ||
var input = this.findDOMNode(); | ||
var pos = 0; | ||
@@ -218,3 +225,3 @@ | ||
if (this.isMounted()) { | ||
input = this.getDOMNode(); | ||
input = this.findDOMNode(); | ||
setPos(); | ||
@@ -227,3 +234,3 @@ setTimeout(setPos, 0); | ||
isFocused: function() { | ||
return document.activeElement === this.getDOMNode(); | ||
return document.activeElement === this.findDOMNode(); | ||
}, | ||
@@ -230,0 +237,0 @@ parseMask: function(mask) { |
{ | ||
"name": "react-input-mask", | ||
"description": "Masked input component for React", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"homepage": "https://github.com/sanniassin/react-input-mask", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
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
36316
964