Skip to content

Commit 236dca8

Browse files
authored
Merge pull request #300 from flagoon/bug/paste_numbers
fixed bug with pasting number over another number
2 parents 594912d + d0dc593 commit 236dca8

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

src/components/IntlTelInput.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,12 +1218,6 @@ class IntlTelInput extends Component {
12181218
}
12191219
};
12201220

1221-
handlePaste = e => {
1222-
if (e.clipboardData) {
1223-
this.updateFlagFromNumber(e.clipboardData.getData('Text'), false);
1224-
}
1225-
};
1226-
12271221
changeHighlightCountry = (showDropdown, selectedIndex) => {
12281222
this.setState({
12291223
showDropdown,
@@ -1290,7 +1284,6 @@ class IntlTelInput extends Component {
12901284
refCallback={this.setTelRef}
12911285
handleInputChange={this.handleInputChange}
12921286
handleOnBlur={this.handleOnBlur}
1293-
handlePaste={this.handlePaste}
12941287
className={inputClass}
12951288
disabled={this.state.disabled}
12961289
readonly={this.state.readonly}

src/components/TelInput.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export default class TelInput extends Component {
1111
value: PropTypes.string,
1212
placeholder: PropTypes.string,
1313
handleInputChange: PropTypes.func,
14-
handlePaste: PropTypes.func,
1514
handleOnBlur: PropTypes.func,
1615
autoFocus: PropTypes.bool,
1716
autoComplete: PropTypes.string,
@@ -50,12 +49,6 @@ export default class TelInput extends Component {
5049
this.setState({ hasFocus: true });
5150
};
5251

53-
handlePaste = e => {
54-
if (typeof this.props.handlePaste === 'function') {
55-
this.props.handlePaste(e);
56-
}
57-
};
58-
5952
render() {
6053
return (
6154
<input
@@ -71,7 +64,6 @@ export default class TelInput extends Component {
7164
value={this.props.value}
7265
placeholder={this.props.placeholder}
7366
onChange={this.props.handleInputChange}
74-
onPaste={this.handlePaste}
7567
onBlur={this.handleBlur}
7668
onFocus={this.handleFocus}
7769
autoFocus={this.props.autoFocus}

0 commit comments

Comments
 (0)