fixed bug which caused get invoice button to move up

This commit is contained in:
michael1011 2018-03-29 18:00:59 +02:00
parent 91b11e4be5
commit 426b0dc636
No known key found for this signature in database
GPG Key ID: 84D249BA71685D46
1 changed files with 8 additions and 3 deletions

View File

@ -8,6 +8,14 @@ var qrCode;
var defaultGetInvoice;
// Fixes weird bug which moved the button up one pixel when its content was changed
window.onload = function () {
var button = document.getElementById("lightningTipGetInvoice");
button.style.height = button.clientHeight + "px";
button.style.width = button.clientWidth + "px";
};
// TODO: maybe don't show full invoice
// TODO: show price in dollar?
function getInvoice() {
@ -85,9 +93,6 @@ function getInvoice() {
var button = document.getElementById("lightningTipGetInvoice");
button.style.height = button.clientHeight + "px";
button.style.width = button.clientWidth + "px";
defaultGetInvoice = button.innerHTML;
button.innerHTML = "<div class='spinner'></div>";