react-telephone-input
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -111,3 +111,3 @@ 'use strict'; | ||
this._cursorToEnd(); | ||
this._cursorToEnd(true); | ||
if (typeof this.props.onChange === 'function') { | ||
@@ -192,8 +192,13 @@ this.props.onChange(this.state.formattedNumber); | ||
// put the cursor to the end of the input (usually after a focus event) | ||
_cursorToEnd: function _cursorToEnd() { | ||
_cursorToEnd: function _cursorToEnd(skipFocus) { | ||
var input = this.refs.numberInput.getDOMNode(); | ||
input.focus(); | ||
if (isModernBrowser) { | ||
var len = input.value.length; | ||
input.setSelectionRange(len, len); | ||
if (skipFocus) { | ||
this.handleInputFocus(); | ||
} else { | ||
input.focus(); | ||
if (isModernBrowser) { | ||
var len = input.value.length; | ||
input.setSelectionRange(len, len); | ||
} | ||
} | ||
@@ -200,0 +205,0 @@ }, |
{ | ||
"name": "react-telephone-input", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "React component for entering and validating international telephone numbers", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -109,3 +109,3 @@ 'use strict'; | ||
this._cursorToEnd(); | ||
this._cursorToEnd(true); | ||
if(typeof this.props.onChange === 'function') { | ||
@@ -190,8 +190,13 @@ this.props.onChange(this.state.formattedNumber); | ||
// put the cursor to the end of the input (usually after a focus event) | ||
_cursorToEnd() { | ||
_cursorToEnd(skipFocus) { | ||
var input = this.refs.numberInput.getDOMNode(); | ||
input.focus(); | ||
if (isModernBrowser) { | ||
var len = input.value.length; | ||
input.setSelectionRange(len, len); | ||
if (skipFocus) { | ||
this.handleInputFocus(); | ||
} else { | ||
input.focus(); | ||
if (isModernBrowser) { | ||
var len = input.value.length; | ||
input.setSelectionRange(len, len); | ||
} | ||
} | ||
@@ -198,0 +203,0 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1533019
23
35217
6