Skip to content

Commit 9a62e44

Browse files
authoredJun 12, 2019
fix(form-input, form-textarea): handle case where input has been removed from document (closes #3498) (#3501)
1 parent 8533868 commit 9a62e44

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/mixins/form-text.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@ export default {
122122
}
123123
// Update the v-model
124124
this.$emit('update', value)
125-
} else if (value !== this.$refs.input.value) {
125+
} else if (this.$refs.input && value !== this.$refs.input.value) {
126126
// When the `localValue` hasn't changed but the actual input value
127-
// is out of sync, make sure to change it to the given one
127+
// is out of sync, make sure to change it to the given one.
128+
// Usually casued by browser autocomplete and how it triggers the
129+
// change or input event, or depending on the formatter function.
130+
// https://github.com/bootstrap-vue/bootstrap-vue/issues/2657
131+
// https://github.com/bootstrap-vue/bootstrap-vue/issues/3498
128132
/* istanbul ignore next: hard to test */
129133
this.$refs.input.value = value
130134
}

0 commit comments

Comments
 (0)
Please sign in to comment.