mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-25 09:44:41 +00:00
14 lines
485 B
JavaScript
14 lines
485 B
JavaScript
const suffix = document.getElementById('default-login-suffix');
|
|
const suffixInput = document.getElementsByClassName('lgn-suffix-input')[0];
|
|
|
|
if (suffix && suffixInput) {
|
|
calculateOffset();
|
|
suffix.addEventListener("DOMCharacterDataModified", calculateOffset);
|
|
}
|
|
|
|
function calculateOffset() {
|
|
// add suffix width to inner right padding of the input field
|
|
if (suffix && suffixInput) {
|
|
suffixInput.style.paddingRight = `${(suffix.offsetWidth ?? 0) + 10}px`;
|
|
}
|
|
} |