File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ export class PendingCopy {
36
36
textarea . value = text ;
37
37
// Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).
38
38
textarea . readOnly = true ;
39
- this . _document . body . appendChild ( textarea ) ;
39
+ // The element needs to be inserted into the fullscreen container, if the page
40
+ // is in fullscreen mode, otherwise the browser won't execute the copy command.
41
+ ( this . _document . fullscreenElement || this . _document . body ) . appendChild ( textarea ) ;
40
42
}
41
43
42
44
/** Finishes copying the text. */
Original file line number Diff line number Diff line change 12
12
< button
13
13
[cdkCopyToClipboard] ="value "
14
14
[cdkCopyToClipboardAttempts] ="attempts "> Copy to clipboard via directive</ button >
15
+
16
+ < section >
17
+ < label for ="testing-area "> Testing area</ label >
18
+ < textarea id ="testing-area " cols ="30 " rows ="5 "> </ textarea >
19
+ </ section >
You can’t perform that action at this time.
0 commit comments