Skip to content

Commit

Permalink
fix: copying link didn't update the url
Browse files Browse the repository at this point in the history
Ticket: ENT-10971
Changelog: None
Signed-off-by: Mikita Pilinka <[email protected]>
  • Loading branch information
mineralsfree committed Dec 7, 2023
1 parent 9d0f4e8 commit f2dc3a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions generator/_assets/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ document.addEventListener("DOMContentLoaded", function () {
e.preventDefault();
navigator.clipboard.writeText(a.href);
a.classList.add('url-copied');
history.replaceState(null, null, a.href);
setTimeout(function () { a.classList.remove('url-copied') }, 2000);
}
})
Expand Down

0 comments on commit f2dc3a4

Please sign in to comment.