fix error during copy

This commit is contained in:
Matteo Manzinello committed 2019-10-28 19:29:38 +01:00
1 parent 39b28366e7
commit 10e27d19bd
3 files changed
+7 -6

No files matched your search

+5 -4
View File
@@ -567,13 +567,14 @@
const copy = content => {
copyToClipboard(content);
let activeCopy;
// the correct copyButton (mail or tel)
mailgoIsShowing(MAIL_TYPE)
? (copyButton = getE("mailgo-copy"))
: (copyButton = getE("mailgo-tel-copy"));
copyButton.textContent = "copied";
? (activeCopy = copyMail)
: (activeCopy = copyTel);
activeCopy.textContent = "copied";
setTimeout(() => {
copyButton.textContent = "copy";
activeCopy.textContent = "copy";
// hide after the timeout
hideMailgo();
}, 999);