react-input-mask
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -537,5 +537,10 @@ "use strict"; | ||
if (text) { | ||
var caretPos = this.getCaretPos(); | ||
var textLen = this.getRawSubstrLength(this.state.value, text, caretPos); | ||
var value = this.insertRawSubstr(this.state.value, text, caretPos); | ||
var value = this.state.value; | ||
var selection = this.getSelection(); | ||
var caretPos = selection.start; | ||
if (selection.length) { | ||
value = this.clearRange(value, caretPos, selection.length); | ||
} | ||
var textLen = this.getRawSubstrLength(value, text, caretPos); | ||
var value = this.insertRawSubstr(value, text, caretPos); | ||
caretPos += textLen; | ||
@@ -542,0 +547,0 @@ caretPos = this.getRightEditablePos(caretPos) || caretPos; |
@@ -523,5 +523,10 @@ // https://github.com/sanniassin/react-input-mask | ||
if (text) { | ||
var caretPos = this.getCaretPos(); | ||
var textLen = this.getRawSubstrLength(this.state.value, text, caretPos); | ||
var value = this.insertRawSubstr(this.state.value, text, caretPos); | ||
var value = this.state.value; | ||
var selection = this.getSelection(); | ||
var caretPos = selection.start; | ||
if (selection.length) { | ||
value = this.clearRange(value, caretPos, selection.length); | ||
} | ||
var textLen = this.getRawSubstrLength(value, text, caretPos); | ||
var value = this.insertRawSubstr(value, text, caretPos); | ||
caretPos += textLen; | ||
@@ -528,0 +533,0 @@ caretPos = this.getRightEditablePos(caretPos) || caretPos; |
{ | ||
"name": "react-input-mask", | ||
"description": "Masked input component for React", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"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
40051
1050