nprapps / liveblog-standalone

NPR's liveblog rig 2.0
Other
6 stars 1 forks source link

Test "copy link" buttons on station embeds #42

Closed alykat closed 4 years ago

alykat commented 4 years ago

Looked at the Iowa liveblog on KPCC's site, and I'm noticing something odd when I click a "copy link" button: I get the "Copied!" animation and I see the console log message, but the link doesn't actually show up in my clipboard.

Works fine from the standalone liveblog, and also from the embedded liveblog preview page hosted on apps.

It appears to work fine from CPR's test page, though, so I can't chalk this up to being a weird cross-domain issue.

thomaswilburn commented 4 years ago

This was a fun one, but turns out to be a simple solution: if the host page is not secure, the guest iframe isn't allowed to access the clipboard. Switching KPCC's staging site to HTTPS makes the copy command work again. I'll mention this to their digital contact.