Saving the original text of the button to show it when the copy function throws an error exception
parent
d9172e5958
commit
bc29cde021
|
@ -168,8 +168,9 @@ THE SOFTWARE.
|
||||||
});
|
});
|
||||||
|
|
||||||
clipboard.on('error', () => {
|
clipboard.on('error', () => {
|
||||||
|
const originalTextCopy = elm.textContent;
|
||||||
elm.textContent = 'Press Ctrl + C to copy';
|
elm.textContent = 'Press Ctrl + C to copy';
|
||||||
resetText();
|
resetText(originalTextCopy);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
showTab(target) {
|
showTab(target) {
|
||||||
|
|
Loading…
Reference in New Issue