microsoftgraph / microsoft-graph-toolkit

Authentication Providers and UI components for Microsoft Graph 🦒
https://docs.microsoft.com/graph/toolkit/overview
Other
925 stars 288 forks source link

Copy email not work inside Teams Tab App when using Person Card component #1531

Open SLdragon opened 2 years ago

SLdragon commented 2 years ago

Teams Tab App do not support Clipboard related js API (see this issue), when I clicked copy button in Person Card component, you will see error messages in console:

image

Uncaught (in promise) DOMException: The Clipboard API has been blocked because of a 
permissions policy applied to the current document

In my opinion, I think we can add a property to determine whether to show copy button in Person Card or if we detect that current environment do not support clipboard API, we can hide copy button.

ghost commented 2 years ago

Hello SLdragon, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

gavinbarron commented 12 months ago

Thanks for raising this @SLdragon, could we use a progressive enhancement approach and only render the button if the api is supported? Or, put another way, do you know how to detect if the clipboard APIs are allowed?

emirhandrms commented 8 months ago

Hi @gavinbarron , I'm having the same issue. Do you have any updates in this issue, or is there any work around for this case?

Thanks