Skip to content

Cannot type on arbitrary elements #172

@MarkAZhang

Description

@MarkAZhang

Any element can receive keydown events if it has a tabindex. However, the cypress type command only works on input text elements and textareas. In order to fire keydown events on arbitrary elements, for example if we want to test keyboard shortcuts in an app, we have to manually create a KeyboardEvent and call dispatchEvent on the element. While this is a viable workaround, a solution in cypress would be preferred.

Metadata

Metadata

Assignees

Labels

type: featureNew feature that does not currently exist

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions