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 bb5aabfCopy full SHA for bb5aabf
src/librustdoc/html/static/js/src-script.js
@@ -206,6 +206,14 @@ const handleSrcHighlight = (function() {
206
};
207
}());
208
209
+if (navigator.userAgent.includes("Firefox")) {
210
+ document.addEventListener("copy", e => {
211
+ const text = nonnull(window.getSelection()).toString();
212
+ nonnull(e.clipboardData).setData("text/plain", text);
213
+ e.preventDefault();
214
+ });
215
+}
216
+
217
window.addEventListener("hashchange", highlightSrcLines);
218
219
onEachLazy(document.querySelectorAll("a[data-nosnippet]"), el => {
0 commit comments