1.0.26
http://codepen.io/anon/pen/akjNbW
A click event to be fired, and then the blur to continue.
A blur event is called and the click event is disposed.
I have no really idea if this is related to Vue or how the Browser handles the event delegations. Although I tested this with Firefox, Chrome, IE and Edge, they ALL behaviored the same.
Any clue would be highly appreciated.
Thanks in advance.
This is an interesting question.
I think the click-related keydown triggers the blur on the input even before that the click event is fired.
Tricky.
This is a standard behavior of the browser. You might want to listen for the mousedown
event instead.
A proper way would be to use more complicated logic:
mousedown
event is enough I think, thank you very much @simplesmiler !
Most helpful comment
This is a standard behavior of the browser. You might want to listen for the
mousedown
event instead.A proper way would be to use more complicated logic: