-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Allow programmatic copy to clipboard #3088
Conversation
This works for my usecase, in both Chrome and FF. But I see that you can't actually test this...I'll come up with a reproducible test case. |
@takluyver Here is an example you can paste into a notebook cell to reproduce this bug and see what this fix does.
|
I tested and it works! Looks good to me. @takluyver Care to merge? |
Thanks, I've also tested this, and it seems to be fine. For my own understanding, why does the existing |
@takluyver I don't find it intuitive either. |
Fair enough. Browsers are strange. |
By the way, thanks for providing the example so we could easily test what you meant! |
Trying to close #2975.
@takluyver I did not go with
document.execCommand
because it does not allow you to set a mime-types like html, json, etc. (or I couldn't find a way to do that anyway) and I see you need that.Let me know if these changes are okay.