vue-tel-input icon indicating copy to clipboard operation
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"'

Open ibrahimBeladi opened this issue 2 years ago • 3 comments

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"

ibrahimBeladi avatar Oct 05 '21 10:10 ibrahimBeladi

I have the same issue, the error also fires on pressing any letter key. Happens when the list is not open.

henningsover avatar Dec 01 '21 07:12 henningsover

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:

  1. Changing v-if to v-show
  2. Using
this.$nextTick(() => {})

when addressing ref and rest of the function handling

antanas-cherryteam avatar May 24 '22 10:05 antanas-cherryteam

Still not fixed, any updates on this @iamstevendao ?

henningsover avatar Apr 28 '23 07:04 henningsover