vue-tel-input
vue-tel-input copied to clipboard
[bug] Pressing up/down on the dropdown button fires 'Error in v-on handler: "TypeError: can't access property "children", this.$refs.list is undefined"'
Pressing up or down arrow key on the dropdown button (when focused) fires
Error in v-on handler: "TypeError: can't access property "children", this.$refs.list is undefined"
I have the same issue, the error also fires on pressing any letter key. Happens when the list is not open.
Sad to see this bug still not fixed after over half of a year I'm experiencing similar behavior, sadly. I suspect https://github.com/iamstevendao/vue-tel-input/blob/245d795e15db26a5980762bf377a4dd5ad89507e/src/components/vue-tel-input.vue#L30 handling happens after https://github.com/iamstevendao/vue-tel-input/blob/245d795e15db26a5980762bf377a4dd5ad89507e/src/components/vue-tel-input.vue#L579 and https://github.com/iamstevendao/vue-tel-input/blob/245d795e15db26a5980762bf377a4dd5ad89507e/src/components/vue-tel-input.vue#L585 thus creating an error. This is because event loop in vue triggers later on, after you're done with your event. This issue could be mitigated 2 ways:
- Changing
v-if
tov-show
- Using
this.$nextTick(() => {})
when addressing ref and rest of the function handling
Still not fixed, any updates on this @iamstevendao ?