jupyter-book/thebe

`Copy to Clipboard` included in code cells when activating

Closed this issue ยท 6 comments

Describe the bug

Activating Thebe will copy in the "Copy to Clipboard" text from copy-button.

image

Reproduce the bug

.

List your environment

.

@rowanc1 where did you encounter that issue? I don't see it in the cells in thebe docs examples
I'd like to reproduce and take a look

ok, reproduced this but it's not clear why it is happening. Will investigate

Hmm - it is because we moved the copy button text into the <title> block of the SVG (which is itself inside the code block):

https://github.com/executablebooks/sphinx-copybutton/blob/915aa4cf0b06f7b781bc4edfc204c62f2ce7cdb6/sphinx_copybutton/_static/copybutton.js_t#L68-L76

I thought that this was fixed here:

https://github.com/executablebooks/sphinx-thebe/pull/48/files#diff-feadee3941d088f69503ae5cc0cfd8d16b1492f3f6d531ff386bf5d3364a26aaR84-R87

Can you make sure you're on the latest sphinx-thebe and try again?

confirmed that this is working with the latest sphinx-thebe!

@joergbrech are you building with sphinx? can you update your dependencies and see if that fixes things.

@choldgraf that probably means that https://jupyterbook.org/interactive/thebe.html?highlight=thebe has not been redeployed since the change?

Yep - I just redeployed https://jupyterbook.org/interactive/thebe.html and the copy to clipboard no longer shows up, so I'll close this one!

I am using thebe via jupyter-book, so this is resolved for me as well. Thanks!