Commit fa7d8d3
committed
Privacy: Exclude the "Copied!" notice from copied policy text.
The "Copy suggested policy text to clipboard" action selected the entire accordion panel, whose contents include the actions toolbar holding the "Copied!" confirmation notice and the button label. Running `document.execCommand( 'copy' )` copies every text node in the selection, including ones hidden with CSS. So double-clicking the button, which renders the notice, leaked "Copied!" into the clipboard. Wrap the suggested policy text in a dedicated `.privacy-text-copy-content` container and select only that node, so the actions toolbar is never part of the copied range.
Developed in WordPress#12008.
Follow-up to r47572, r50161.
Props masteradhoc, vivekawsm, westonruter, sruthi89, sumitbagthariya16.
Fixes #58969.
git-svn-id: https://develop.svn.wordpress.org/trunk@62663 602fd350-edb4-49c9-b593-d223f7449a821 parent f04cb62 commit fa7d8d3
2 files changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
| |||
0 commit comments