We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 035e678 commit eb8b552Copy full SHA for eb8b552
site/src/hooks/useClipboard.ts
@@ -80,6 +80,9 @@ function simulateClipboardWrite(textToCopy: string): boolean {
80
const previousFocusTarget = document.activeElement;
81
const dummyInput = document.createElement("input");
82
83
+ // Have to add test ID to dummy element for mocking purposes in tests
84
+ dummyInput.setAttribute("data-testid", "dummy");
85
+
86
// Using visually-hidden styling to ensure that inserting the element doesn't
87
// cause any content reflows on the page (removes any risk of UI flickers).
88
// Can't use visibility:hidden or display:none, because then the elements
0 commit comments