Skip to content

Commit

Permalink
Fixed #705 - InputNumber's onInputBlur fails when component gets dest…
Browse files Browse the repository at this point in the history
…royed
  • Loading branch information
cagataycivici committed Nov 27, 2020
1 parent b99c8f6 commit 5ffb2a3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/inputnumber/InputNumber.vue
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,12 @@ export default {
onInputBlur(event) {
this.focused = false;
let newValue = this.validateValue(this.parseValue(this.$refs.input.$el.value));
this.$refs.input.$el.value = this.formatValue(newValue);
this.$refs.input.$el.setAttribute('aria-valuenow', newValue);
this.updateModel(event, newValue);
if (this.$refs && this.$refs.input) {
let newValue = this.validateValue(this.parseValue(this.$refs.input.$el.value));
this.$refs.input.$el.value = this.formatValue(newValue);
this.$refs.input.$el.setAttribute('aria-valuenow', newValue);
this.updateModel(event, newValue);
}
this.$emit('blur', event);
},
Expand Down

0 comments on commit 5ffb2a3

Please sign in to comment.