The editable text boxes on https://play.rust-lang.org and Documentation - Rust By Example are broken. If I copy several lines from an editable text box, my clipboard will only have the last two lines. This makes it difficult to paste code I've been working on in the Playground or copy from the Rust by Example examples.
This doesn't happen on my machine.
Does this behaviour persist in other apps, such as gedit (you seem to be using PopOS, so it is probably installed as "Text Editor")?
Works for me, too. Are you experiencing the same behavior when using the keyboard shortcuts for copying+pasting rather than the context menu?
The two pages use the ace editor. Does the problem also occur on that editor’s website? Does the problem disappear in the playground when you change the editor (in the config [top right corner]) to "simple" or "monaco"?
No, everything else fills the clipboard properly: the noneditable text on those same pages, other websites with editable text, other applications like the text editor. It's only the editable text boxes on pages like those two.
The keyboard shortcuts also have the problem. The problem exists on that editor's website as well. monaco is broken (you have to press Enter twice to insert a linebreak, right click menu doesn't even have a paste on it, and Ctrl+X fails to remove the text), but simple seems to work.
I turned off all extensions, reinstalled Firefox in case its files were corrupted, and cleared my cookies and cache and restarted Firefox. None fixed the issue.
As temporary workarounds… Rust by example code blocks have a “Copy to clipboard” button in the top right corned, which might still work for you. Rust playground has the simple editor working, and switching to it seems to preserve the current code.
Interesting. On that note, I can confirm that I do not have the issue myself on Firefox either.
Feel free to share a bit more system information so its easier to search for solutions…
Ah, nice. In the meantime, searching for ace issues with copying on Firefox I found e.g. this one where proposed solutions suggest looking in to a specific option ("dom.event.clipboardevents.enabled") in about:config. Maybe it was something completely different though… but a badly configured options might have been the problem.