From bc29cde02122cc0b558f6137ac73c60f7e405b4e Mon Sep 17 00:00:00 2001 From: Raul Soledispa Date: Sat, 1 Oct 2022 21:55:07 -0500 Subject: [PATCH] Saving the original text of the button to show it when the copy function throws an error exception --- src/nginxconfig/templates/setup.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nginxconfig/templates/setup.vue b/src/nginxconfig/templates/setup.vue index 67d3b7d..c9be8a1 100644 --- a/src/nginxconfig/templates/setup.vue +++ b/src/nginxconfig/templates/setup.vue @@ -168,8 +168,9 @@ THE SOFTWARE. }); clipboard.on('error', () => { + const originalTextCopy = elm.textContent; elm.textContent = 'Press Ctrl + C to copy'; - resetText(); + resetText(originalTextCopy); }); }, showTab(target) {