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 {
3636 textarea . value = text ;
3737 // Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).
3838 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 ) ;
4042 }
4143
4244 /** Finishes copying the text. */
Original file line number Diff line number Diff line change 1212< button
1313 [cdkCopyToClipboard] ="value "
1414 [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