Skip to content

Using arrow function inside v-on with key modifiers doesn't wok #5120

@gotoprototype

Description

@gotoprototype

Using an arrow function inside v-on directive together with a key modifier doesn't work.

  <!-- works -->
  <input type="text" v-on:keyup="changed">
  <!-- works -->
  <input type="text" v-on:keyup.enter="changed">
  <!-- works -->
  <input type="text" v-on:keyup="e => changed(e)">
  <!-- DOESN'T WORK -->
  <input type="text" v-on:keyup.enter="e => changed(e)">

fiddle to test it yourself

I asked in a forum thread first, it was mentioned that this could be a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions