fix button width

This commit is contained in:
PierreDubrulle 2024-01-25 20:33:24 +01:00 committed by Alexis Metaireau
parent 2943d69b63
commit 0d3496ade1

View file

@ -293,9 +293,14 @@
if (previousCopied !== null) {
previousCopied.innerHTML = previousHtmlCopied;
}
var originalWidth = button.offsetWidth;
previousHtmlCopied = button.innerHTML;
button.innerHTML = '✓ ';
previousCopied = button;
if (button.offsetWidth !== originalWidth) {
button.style.width = originalWidth + 'px';
}
}
}, function(err) {
console.error('Could not copy text: ', err);