You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How did you create clipboardData? Are you using a raw JS object? JSDOM doesn't implement ClipboardData (see jsdom/jsdom#1568).
If you need a proper value of clipboardData passed automatically when calling paste, I'm tracking support for custom implementations of ClipboardData and DataTransfer in #355 (comment). If you just need the type fixed we can fix that separately.
@testing-library/user-event
version: 12.3.0Testing Framework and version: Not Relevant
DOM Environment: Not Relevant
Relevant code or config
https://github.com/testing-library/user-event/blob/master/typings/index.d.ts#L65
What you did:
When using user-event in typescript, I wanted to pass in
clipboardData
into theeventInit
arg ofpaste
, as directed by theREADME
: https://github.com/testing-library/user-event/blob/master/README.md#pasteelement-text-eventinit-optionsWhat happened:
I get a type error indicating that
clipboardData
is not found onMouseEventInit
Reproduction repository:
I'd be happy to put a repro repo, but the issue and fix seem straightforward.
Problem description:
The
eventInit
arg inpaste
is of typeMouseEventInit
.Suggested solution:
The
eventInit
arg inpaste
should be typeClipboardEventInit
. (https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules_typedoc_node_modules_typescript_lib_lib_dom_d_.clipboardeventinit.html)The text was updated successfully, but these errors were encountered: