Skip to content

type/keyboard modifier key not working as described in the docs #1128

Open
@fn0rth

Description

@fn0rth

Reproduction example

https://codesandbox.io/s/user-event-modifiers-not-working-78eg54?file=/src/App.test.js

Prerequisites

render(<input />);

const input = screen.getByRole("textbox");

await userEvent.type(input, "{Shift>}a{/Shift}");

expect(input.value).toBe("A");

Expected behavior

Input value should be A (uppercase) if I understand the docs correctly

Actual behavior

Input value is a (lowercase)

User-event version

14.4.3

Environment

Testing Library framework: @testing-library/[email protected]

JS framework: [email protected]

Test environment: [email protected]

DOM implementation: [email protected]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds specificationThe desired behavior is not defined yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions