Fix layout shift from async USD prices and token balances
Reserve vertical space with min-height and placeholders for all elements populated by async data: per-address USD totals, ETH price display, token balance containers, and total value sub-line. Prevents buttons and click targets from moving when price API responds.
This commit is contained in:
@@ -124,7 +124,8 @@ function show() {
|
||||
|
||||
// USD total for this token only
|
||||
const usdVal = price ? amount * price : 0;
|
||||
$("address-token-usd-total").textContent = formatUsd(usdVal);
|
||||
const usdStr = formatUsd(usdVal);
|
||||
$("address-token-usd-total").innerHTML = usdStr || " ";
|
||||
|
||||
// Single token balance line (no tokenId — not clickable here)
|
||||
$("address-token-balance").innerHTML = balanceLine(symbol, amount, price);
|
||||
|
||||
Reference in New Issue
Block a user