[Solved] The editable text boxes on two Rust sites seem to be broken

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.

Is anybody else experiencing this?

Demonstration video:

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")?

Nope. Works for me :slight_smile:

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"?

1 Like

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.

Did you try a different browser yet? E.g. Firefox vs. a Chromium-based one? Any extensions that interfere with javascript?

It works on Chrome.

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.

I refreshed Firefox, which seems to have worked.

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.