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 => { const copy = content => {
copyToClipboard(content); copyToClipboard(content);
let activeCopy;
// the correct copyButton (mail or tel) // the correct copyButton (mail or tel)
mailgoIsShowing(MAIL_TYPE) mailgoIsShowing(MAIL_TYPE)
? (copyButton = getE("mailgo-copy")) ? (activeCopy = copyMail)
: (copyButton = getE("mailgo-tel-copy")); : (activeCopy = copyTel);
copyButton.textContent = "copied"; activeCopy.textContent = "copied";
setTimeout(() => { setTimeout(() => {
copyButton.textContent = "copy"; activeCopy.textContent = "copy";
// hide after the timeout // hide after the timeout
hideMailgo(); hideMailgo();
}, 999); }, 999);