Skip to content
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

Make button un-selectable #72

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Apr 18, 2020

When you do not use the copy button to copy text, but you select text in the old-fashioned way to copy it, you might also inadvertently select the button itself. This especially happens when selecting multiple adjacent code blocks.

This is a minor aesthetic glitch, but the real problem is that the alt text (typically "Copy to clipboard") ends up polluting the clipboard!

@choldgraf choldgraf merged commit f76817a into executablebooks:master Apr 20, 2020
@choldgraf
Copy link
Member

choldgraf commented Apr 20, 2020

I'm not super familiar with this CSS option but it seems like a good idea to me! Thanks for the patch

@mgeier mgeier deleted the dont-select-button branch April 20, 2020 17:04
@mgeier
Copy link
Contributor Author

mgeier commented Apr 20, 2020

I've just discovered this recently in the context of code blocks with line numbers, where it totally makes sense not to select the line numbers.

I've also added it in nbsphinx in spatialaudio/nbsphinx#439.

After that, it should be able to select code from multiple adjacent Jupyter code cells, without the prompts or copy icons messing anything up.

@choldgraf
Copy link
Member

nice - that sounds quite useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants