Fix copyShareLink not working in Chrome (and possibly other browsers)

This commit is contained in:
Maria Merkel
2025-08-30 18:00:32 +02:00
committed by wiedehopf
parent 9d0323f799
commit 9c0f2e9579

View File

@@ -8910,15 +8910,7 @@ shareLinkInput.hidden = true;
document.body.appendChild(shareLinkInput);
function copyShareLink() {
// Assign shareLinkInput the value we want to copy
shareLinkInput.setAttribute("value", shareLink);
// Highlight its content
shareLinkInput.select();
// Copy the highlighted text
document.execCommand("copy");
// deselect input field
shareLinkInput.blur();
navigator.clipboard.writeText(shareLink);
copyLinkTime = new Date().getTime();
copiedIcao = SelectedPlane.icao;