New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BEAM-12607] - Copy Code Snippet copies html tags #15611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, @fernando-wizeline ! I tested with staged version and it works for me on Mac.
In the same time, could you avoid merge commits and just rebase your feature branch with a fix commit on top of master
branch? Thanks!
Agreed to remove! Thanks.
…On Wed, Sep 29, 2021, 11:10 AM Alexey Romanenko ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In website/www/site/static/js/copy-to-clipboard.js
<#15611 (comment)>:
> @@ -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');
+1 to remove it. @pabloem <https://github.com/pabloem>, wdyt?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15611 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ5Z3BIZC4KGTDTR4RPJQLUENCAJANCNFSM5E6NB7ZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @aromanenko-dev ! I'm trying to squash my commits, but the commits displayed here and the ones shown in my local branch differ by 5 "Merge branch 'apache:master' into master" commits. I see six here while in my local branch I see only one. |
@fernando-wizeline Well, I guess it would be easier to re-create your feature branch ( |
Great! Thanks for the suggestion @aromanenko-dev! |
Hitting the "copy to clipboard" button copies the snippet with all the html formatting.
By using the innerText instead of the innerHTML property, we were able to get the actual text without the HTML code.
@pabloem is this something you can help me to review?
Thanks!
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunner
compliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.