Skip to content

Commit 6cc06b3

Browse files
authored
Added stopPropagation to "copy text" buttons in backend (#4019)
1 parent 1fcf745 commit 6cc06b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/varien/js.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,8 @@ function createCopyIconElement() {
737737
* @param {Event} event - The event object triggered by the click event
738738
*/
739739
function copyText(event) {
740+
event.stopPropagation();
741+
event.preventDefault();
740742
const copyIcon = event.currentTarget;
741743
const copyText = copyIcon.previousElementSibling.getAttribute('data-copy-text');
742744
navigator.clipboard.writeText(copyText);

0 commit comments

Comments
 (0)