You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/09/29 03:42:12 UTC

[GitHub] [beam] pabloem commented on a change in pull request #15611: [BEAM-12607] - Copy Code Snippet copies html tags

pabloem commented on a change in pull request #15611:
URL: https://github.com/apache/beam/pull/15611#discussion_r718128914



##########
File path: website/www/site/static/js/copy-to-clipboard.js
##########
@@ -13,15 +13,15 @@
 $(document).ready(function() {
     function copy() {
         $(".copy").click(function(){
-            var text=$(this).siblings()[$(this).siblings().length-1].childNodes[0].innerHTML;
+            var text=$(this).siblings()[$(this).siblings().length-1].childNodes[0].innerText;
             const el=document.createElement('textarea');
             el.value=text;document.body.appendChild(el);
             el.select();document.execCommand('copy');
             document.body.removeChild(el);
             alert('copied to clipboard');

Review comment:
       should we leave this alert here? is there a less intrusive way of noting that things have been copied? the alert requires you to accept, which is kind of annoying...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org