Skip to content

support {home} and {end} in type() #537

@curiosity26

Description

@curiosity26
  • @testing-library/user-event version: 12.6.0
  • Testing Framework and version:
    Jest 26.6.3
  • DOM Environment: 16.4.0 (from jest)

Relevant code or config

userEvent.type(getByRole('listbox'), '{home}')
userEvent.type(getByRole('listbox'), '{end}')

What you did:

userEvent.type(getByRole('listbox'), '{home}')
userEvent.type(getByRole('listbox'), '{end}')

What happened:

The input to the keyDown event was { then h then o then m then e then } and similar for {end}

Reproduction repository:

Problem description:
type doesn't support Home and End keys

Suggested solution:
Applied in fix #536

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