The Clipboard uses the Clipboard API which is not supported by some older browsers. You can find a browser compatibiitiy list here. If this is causing the icon to disappear, then you will see a warning message in the browser console.
If you instead see undefined or null or some such, the clipboard has been disabled. If so, my guess is your company has some IT policy blocking the clipboard, on the theory that a malicious site could harvest a password or something this way…
@alemedeiros or anyone else here, can you elaborate on how the code your last response contained fixed this? Sorry to revive this old post but it’s all I can find on the topic. Is this solution to use instead of using dcc.Clipboard entirely?
My dcc.Clipboard icon disappeared when I deployed my Dash app to Heroku this week. My code otherwise looks essentially the same as the original post here.
Icon appeared in Chrome on my MacBook throughout local development.
Icon is now gone in Chrome on same computer at production address, deployed with heroku git.
Maybe Heroku has something similar blocking the clipboard to some corporate policies? I knew from the docs that it wouldn’t work on all browsers, but missed this disappearance in my final staging testing.
In case anyone is following or runs into this, I realized the icon is correctly appearing, within a modal triggered by a button, at the default …herokuapp.com address generated for my app. The change for me is happening when the app is redirected with the CNAME flattening/CNAME alias method to my own registered subdomain URL, where the icon does not show up.
So I’ll be researching that, talking to my domain provider support, in addition to trying the code revision recommended here.
FYI, the steps where this occurred for me…
Click on app served at local machine address, opening it in Chrome, and confirm clipboard paper stack icon appears as expected next to text area (upper right outside text area).
Deploy to staging on Heroku with 3 build packs: SSH, git LFS, recommended built-in Python pack.
Click on app served at sustain-our-soil-staging.herokuapp.com Heroku address, opening it in Chrome, and confirm clipboard paper stack icon appears as expected next to text area (upper right outside text area).
Promote from staging to production in pipeline, and repeat step 4 with same result.
Click on app served at sustain-our-soil.kathrynhurchla.com Porkbun registered address, opening it in Chrome, and now the clipboard paper stack icon has disappeared appears from its location next to text area.
Confirmed icon does still appear correctly when visiting app at Heroku address, although it does not appear at my alias subdomain.
BTW - your site is very interesting – I didn’t know Soil Organic Carbon Density was a factor in climate change. Please feel free to create a show-and-tell post. I sure others would like to know more about this topic too