contentauth / c2pa-js

JavaScript SDK for displaying and validating C2PA data
https://opensource.contentauthenticity.org
MIT License
74 stars 40 forks source link

Content credentials only pop up on 1st image on mouse over #160

Open brianchau opened 7 months ago

brianchau commented 7 months ago

I wrapped the on 3 images but only the first one displayed the content credentials on mouse over. Codes for each image are like below:

Screenshot 2024-04-23 153033

Any suggestion what I may have missed?

Another question I have is what the tag should be for mouse click instead of mouse over?

Thank you.

dkozma commented 7 months ago

@brianchau How are you passing the content credentials to the cai-manifest-summary component? Can you show the code for that?

You should be able to pass trigger="click:mouseleave" to the cai-popover component to make it appear on click.

brianchau commented 7 months ago

Thank you Dave. Got this working using trigger="click:mouseleave" as you suggested. Click "CR" icon now displays the popup. MouseLeave hides the popup. How to change it to toggle so that it would hide the popup when click again on the "CR" icon, like the behavior in home page of https://contentcredentials.org/ Thanks