Skip to content

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

@DanielPe05

Description

@DanielPe05

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions