<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WxCC Desktop iFrame JS Copy to Clipboard Failing in Webex for Developers</title>
    <link>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4823901#M3512</link>
    <description>&lt;P&gt;Thanks Santosh - doing that now..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 09:34:39 GMT</pubDate>
    <dc:creator>Faisal Zaidi</dc:creator>
    <dc:date>2023-04-28T09:34:39Z</dc:date>
    <item>
      <title>WxCC Desktop iFrame JS Copy to Clipboard Failing</title>
      <link>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4822839#M3510</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider gr b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;We have a web application which contains a button to invoke a JavaScript function which copies text from a textbox to the users clipboard. This functions works perfectly when the application is browsed directly. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider gr b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;However, when we embed the application as an iFrame in the WxCC Agent Desktop, the copy to clipboard doesnt work and we get the following error in the browser console logs for Chrome and Edge (Firefox still works fine):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider gr b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;"Uncaught (in promise) DOMException: The Clipboard API has been blocked because of a permissions policy applied to the current document."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We have tried to set both of these custom header values in our iFrame application as well as directly in IIS on the hosting WebServer but neither has worked:&lt;/P&gt;
&lt;P&gt;&amp;lt;add name="Content-Security-Policy" value="frame-ancestors 'self' https://*.cisco.com;" /&amp;gt;&lt;BR /&gt;&amp;lt;add name="Permissions-Policy" value="geolocation=(self '&lt;A href="https://desktop.wxcc-eu1.cisco.com" target="_blank" rel="noopener"&gt;https://desktop.wxcc-eu1.cisco.com&lt;/A&gt;')" /&amp;gt;&lt;/P&gt;
&lt;P&gt;Any ideas please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 09:47:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4822839#M3510</guid>
      <dc:creator>Faisal Zaidi</dc:creator>
      <dc:date>2023-04-27T09:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: WxCC Desktop iFrame JS Copy to Clipboard Failing</title>
      <link>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4823665#M3511</link>
      <description>&lt;P&gt;Hi Faisal, Could you please raise this query as a ZENDESK ticket as that will be our new process to handle the Wxcc API request queries?&lt;BR /&gt;You could write a mail to this &lt;A href="mailto:wxccdevsupport@webex.com" target="_blank"&gt;&lt;SPAN&gt;wxccdevsupport@webex.com&lt;/SPAN&gt;&lt;/A&gt; and it will create a ticket on us. Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 06:09:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4823665#M3511</guid>
      <dc:creator>Santosh Patil</dc:creator>
      <dc:date>2023-04-28T06:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: WxCC Desktop iFrame JS Copy to Clipboard Failing</title>
      <link>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4823901#M3512</link>
      <description>&lt;P&gt;Thanks Santosh - doing that now..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 09:34:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4823901#M3512</guid>
      <dc:creator>Faisal Zaidi</dc:creator>
      <dc:date>2023-04-28T09:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: WxCC Desktop iFrame JS Copy to Clipboard Failing</title>
      <link>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4944546#M3513</link>
      <description>&lt;P&gt;Is this resolved? Can someone brief on the solution?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 22:02:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4944546#M3513</guid>
      <dc:creator>sanjeevwagh1</dc:creator>
      <dc:date>2023-10-19T22:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: WxCC Desktop iFrame JS Copy to Clipboard Failing</title>
      <link>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4944704#M3514</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/115204"&gt;@sanjeevwagh1&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To resolve the issue we have provided example code snippets for both same-origin and cross-origin scenarios, demonstrating the usage of the "allowedParams" attribute.&lt;/P&gt;
&lt;P&gt;For same-origin scenarios:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "comp1": {
    "comp": "agentx-wc-iframe",
    "attributes": {
      "src": "https://widget-kad.s3.amazonaws.com/Trading.htm",
      "allowedParams": "clipboard-read; clipboard-write"
    },
    "wrapper": {
      "title": "Return drop off locations",
      "maximizeAreaName": "app-maximize-area"
    }
  }
}&lt;/LI-CODE&gt;
&lt;P class="p1"&gt;For cross-origin scenarios:&amp;nbsp;&lt;SPAN&gt;${URL} URL for the site that you are copying from&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "comp1": {
    "comp": "agentx-wc-iframe",
    "attributes": {
      "src": "https://widget-kad.s3.amazonaws.com/Trading.htm",
      "allowedParams": "clipboard-read; clipboard-write self ${URL}"
    },
    "wrapper": {
      "title": "Return drop off locations",
      "maximizeAreaName": "app-maximize-area"
    }
  }
}&lt;/LI-CODE&gt;
&lt;P class="p1"&gt;Adding the `&lt;EM&gt;allowedParams&lt;/EM&gt;` attribute as either "&lt;EM&gt;clipboard-read; clipboard-write&lt;/EM&gt;" or "&lt;EM&gt;clipboard-read; clipboard-write self ${URL}&lt;/EM&gt;" enables clipboard read and write operations within the iframe.&lt;/P&gt;
&lt;P class="p1"&gt;We've also added an example to our GitHub repository, which you can find here - &lt;A href="https://github.com/CiscoDevNet/webex-contact-center-widget-starter/blob/master/Iframe_Widget_Allowedparams.json" target="_blank"&gt;https://github.com/CiscoDevNet/webex-contact-center-widget-starter/blob/master/Iframe_Widget_Allowedparams.json&lt;/A&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN&gt;Please try these and let us know the outcome. If the issue still persists, I suggest creating a ticket here for further assistance -&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer.webex-cx.com/support/" target="_new"&gt;https://developer.webex-cx.com/support/&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 06:36:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/wxcc-desktop-iframe-js-copy-to-clipboard-failing/m-p/4944704#M3514</guid>
      <dc:creator>Sham N Satyaprasad</dc:creator>
      <dc:date>2023-10-20T06:36:18Z</dc:date>
    </item>
  </channel>
</rss>

