R
R
Ruslan Absalyamov2019-03-06 11:13:13
Vue.js
Ruslan Absalyamov, 2019-03-06 11:13:13

Event handlers conflict, how to fix?

I have an input with a dropdown list , because of the blur event handler on the input, the selection of the list item on the click event does not work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-03-06
@rusline18

The blur handler hides the list before the click event occurs. Accordingly, the click is not on the list element at all. Handle mousedown instead of click, it's here:

@click="checkOption(option);"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question