fix error during copy

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

2
dist/mailgo.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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);