Skip to content

Issue with Vue config keyCode aliases and triggering keydown events #1295

@tbcorr

Description

@tbcorr

Version

1.0.0-beta.29

Reproduction link

https://github.com/tbcorr/vue-test-utils-issue

Steps to reproduce

Run the unit tests and look at the failing tests.

What is expected?

I would expect keydown event handlers bound to specific keyCode aliases would only be called when the specific key is pressed.

What is actually happening?

It appears that keydown event handlers bound to keydown events with custom keyCode aliases are being called for all keydown events, regardless of the key which triggered the event.


I'm not sure if this is only related to triggering keydown events. It just so happens I noticed this issue while testing keydown events. I'm also not sure if this is only related to the keys I was testing which are Home, End, Page Up, Page Down. Also, in browser I get the expected behavior which makes me think this is related to vue-test-utils.

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