mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
Checkout: Fix language select width in modal (#4823)
This commit is contained in:
parent
22657b66d7
commit
08ff2f3173
2 changed files with 6 additions and 3 deletions
|
@ -179,8 +179,7 @@ section dl > div dd {
|
||||||
background: rgba(var(--btcpay-black-rgb), 0.85);
|
background: rgba(var(--btcpay-black-rgb), 0.85);
|
||||||
}
|
}
|
||||||
.checkout-modal h1,
|
.checkout-modal h1,
|
||||||
.checkout-modal footer a:hover,
|
.checkout-modal footer a:hover {
|
||||||
.checkout-modal #DefaultLang:hover {
|
|
||||||
color: var(--btcpay-white);
|
color: var(--btcpay-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,11 @@ function updateLanguageSelect() {
|
||||||
$languageSelect.parentElement.appendChild(element);
|
$languageSelect.parentElement.appendChild(element);
|
||||||
const width = element.offsetWidth;
|
const width = element.offsetWidth;
|
||||||
$languageSelect.parentElement.removeChild(element);
|
$languageSelect.parentElement.removeChild(element);
|
||||||
$languageSelect.style.setProperty('--text-width', `${width}px`);
|
if (width && width > 0) {
|
||||||
|
$languageSelect.style.setProperty('--text-width', `${width}px`);
|
||||||
|
} else { // in case of modal this might not be rendered properly yet
|
||||||
|
window.requestAnimationFrame(updateLanguageSelect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateLanguage(lang) {
|
function updateLanguage(lang) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue