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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying code block content doesn't preserve newlines on Firefox #5663
Comments
Couldn't reproduce on Firefox 0.92 MacOS |
I have the same problem as @Martinsos on Firefox 93.0 MacOS Catalina 10.15.7 |
oh I can reproduce indeed, it's the selection that can't copy lines, not the copy button that works everywhere. |
Exactly! The problem is, sometimes a block of code might be relatively big and somebody might need to copy just a part of it. We had this situation in our tutorial, where we guide people to copy the highlighted piece of the code, and then user reported this issue on firefox. |
Oh, this is quite serious bug, it should be fixed in this PR #5668. |
馃悰 Bug Report
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Open https://docusaurus.io/docs/markdown-features/code-blocks in Firefox, select piece of code from code block, press Ctrl+C to copy it, paste it anywhere (e.g. in text editor), and notice how newlines are lost.
On Chrome this problem doesn't exist and newlines are correctly preserved/captured.
If "copy" button (in the top-right corner) is used, newlines are preserved though, even on Firefox. But "copy" button requires copying the whole block of code, you can't copy just part of it.
I tried doing the same thing at https://mdxjs.com/, and there copying works ok, newlines are preserved on Firefox.
Have you read the Contributing Guidelines on issues?
Yes
Your environment
ArchLinux 5.14.7-arch1-1, Firefox 93.0 (64-bit).
The text was updated successfully, but these errors were encountered: