[ 
https://issues.apache.org/jira/browse/NIFI-14080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17913118#comment-17913118
 ] 

Scott Aslan commented on NIFI-14080:
------------------------------------

Handling the Angular CDK Clipboard with asynchronous operations in Safari can 
be a bit tricky due to how Safari handles the Clipboard API and the fact that 
NiFi makes an async call. Understanding the Issue
*Safari's Asynchronous Clipboard API:*

Safari, unlike other browsers, implemented the Clipboard API asynchronously. 
This means that when you try to copy text to the clipboard, it returns a 
Promise that resolves when the copy operation is complete.
**

*Angular CDK Clipboard:*

The Angular CDK Clipboard module simplifies clipboard interactions, but {*}it 
doesn't directly handle asynchronous operations in Safari{*}.

I believe we want to keep the current `navigator.clipboard.writeText` 
implementation to ensure that copy works across all of the supported browsers.

> Copy to Clipboard Implementation
> --------------------------------
>
>                 Key: NIFI-14080
>                 URL: https://issues.apache.org/jira/browse/NIFI-14080
>             Project: Apache NiFi
>          Issue Type: Sub-task
>          Components: Core UI
>            Reporter: Matt Gilman
>            Priority: Major
>
> We should revisit the implementation of how the UI copies to the system 
> clipboard. Currently, in places the user is leverage the navigator clipboard 
> directly [1] but we should consider using the Angular Clipboard module [2] to 
> help simplify things and make it easier to test.
> [1] https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard
> [2] https://material.angular.io/cdk/clipboard/overview



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to