Saving the original text of the button to show it when the copy function throws an error exception

This commit is contained in:
Raul Soledispa 2022-10-01 21:55:07 -05:00
parent d9172e5958
commit bc29cde021
1 changed files with 2 additions and 1 deletions

View File

@ -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) {