Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@input event is being fired when element looses focus #5744

Closed
DanielPe05 opened this issue May 24, 2017 · 2 comments
Closed

@input event is being fired when element looses focus #5744

DanielPe05 opened this issue May 24, 2017 · 2 comments

Comments

@DanielPe05
Copy link

DanielPe05 commented May 24, 2017

Version

2.3.0

Reproduction link

https://jsfiddle.net/jnz0vtty/

Steps to reproduce

  1. Create an input field which calls some method when the user types (@input)
  2. Blur out of the field and the method will be called as if the user had typed something.

What is expected?

The @input event should only be triggered when the user types in the input element.

What is actually happening?

The @input event is being called when the user blurs out of the input field


I'm working on a typeahead component and I'm seeing a weird behavior that I'm not sure is a Vue specific bug or desired behavior. What happens is that I have a method being called on @input to trigger searches, this works nicely, however, when the input looses focus that method is also being called. This is very weird.

@sqal
Copy link
Contributor

sqal commented May 24, 2017

It has been already fixed in 2.3.3 (i guess via this PR #5589)

https://jsfiddle.net/ymgovcg1/

@posva
Copy link
Member

posva commented May 24, 2017

what @sqal said

@posva posva closed this as completed May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants