We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b0274c commit 92bc271Copy full SHA for 92bc271
src/librustdoc/html/static/js/src-script.js
@@ -206,6 +206,15 @@ const handleSrcHighlight = (function() {
206
};
207
}());
208
209
+// Workaround for https://github.com/rust-lang/rust/issues/141464
210
+if (navigator.userAgent.includes("Firefox")) {
211
+ document.addEventListener("copy", e => {
212
+ const text = nonnull(window.getSelection()).toString();
213
+ nonnull(e.clipboardData).setData("text/plain", text);
214
+ e.preventDefault();
215
+ });
216
+}
217
+
218
window.addEventListener("hashchange", highlightSrcLines);
219
220
onEachLazy(document.querySelectorAll("a[data-nosnippet]"), el => {
0 commit comments