Skip to content

Commit c151ca0

Browse files
authored
Merge pull request #25 from Saniol/ie11-blur-fix
ie 11 blur issue fix
2 parents 294d536 + 1cb062d commit c151ca0

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ module.exports =
140140

141141
if (this.state.inputFocus) {
142142
this.refs.input.focus();
143-
}
144-
145-
if (this.state.selectionStart || this.state.selectionStart === 0) {
146-
this.refs.input.selectionStart = this.state.selectionStart;
147-
}
148-
149-
if (this.state.selectionEnd || this.state.selectionEnd === 0) {
150-
this.refs.input.selectionEnd = this.state.selectionEnd;
143+
144+
if (this.state.selectionStart || this.state.selectionStart === 0) {
145+
this.refs.input.selectionStart = this.state.selectionStart;
146+
}
147+
148+
if (this.state.selectionEnd || this.state.selectionEnd === 0) {
149+
this.refs.input.selectionEnd = this.state.selectionEnd;
150+
}
151151
}
152152

153153
this.checkValidity();

src/NumericInput.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,16 @@ class NumericInput extends Component
365365
// this.state.inputFocus to true)
366366
if (this.state.inputFocus) {
367367
this.refs.input.focus()
368-
}
369368

370-
// Restore selectionStart (if any)
371-
if (this.state.selectionStart || this.state.selectionStart === 0) {
372-
this.refs.input.selectionStart = this.state.selectionStart
373-
}
369+
// Restore selectionStart (if any)
370+
if (this.state.selectionStart || this.state.selectionStart === 0) {
371+
this.refs.input.selectionStart = this.state.selectionStart
372+
}
374373

375-
// Restore selectionEnd (if any)
376-
if (this.state.selectionEnd || this.state.selectionEnd === 0) {
377-
this.refs.input.selectionEnd = this.state.selectionEnd
374+
// Restore selectionEnd (if any)
375+
if (this.state.selectionEnd || this.state.selectionEnd === 0) {
376+
this.refs.input.selectionEnd = this.state.selectionEnd
377+
}
378378
}
379379

380380
this.checkValidity()

0 commit comments

Comments
 (0)