Skip to content

Commit 655655c

Browse files
committed
Use select()
1 parent f47a2e9 commit 655655c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/_static/link_gen/link.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ function linkMain() {
286286

287287
function copyLink(elementId) {
288288
var copyText = document.getElementById(elementId);
289-
copyText.focus();
289+
copyText.select();
290+
copyText.setSelectionRange(0, copyText.value.length);
290291
navigator.clipboard.writeText(copyText.value);
291292
}

0 commit comments

Comments
 (0)