Skip to content

Random event triggered on @input with v-model #5586

@rdzar

Description

@rdzar

Version

2.3.2

Reproduction link

https://jsfiddle.net/9zcdvdxu/4/

Steps to reproduce

  • Click in the text input
  • Type any letter (h)
  • Hit enter
  • Two events triggered
  • Hit enter again; no event (expected)

What is expected?

Enter to not trigger an event, just like it normally does if you do not type anything before it.

Same behavior as in 2.6.2 see https://jsfiddle.net/hcnok29L/4/

What is actually happening?

It adds an extra event when hitting the enter key, but it doesn't do so when hitting the enter key normally without anything typed in front of it.


We couldn't find any reason or explanation for this within the changelogs, assuming it is not intended behavior. A customer complained that our autocomplete stayed open after they hit the enter key and it didn't previous week. The fix was easy, move the keydown keyup for canceling the up-coming request. But is was kinda strange bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions