Stop OTC live validation scrolling
This commit is contained in:
@@ -894,7 +894,6 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
|
||||
echo " if (errorEl) {";
|
||||
echo " errorEl.textContent = errorMsg;";
|
||||
echo " errorEl.classList.toggle('hidden', errorMsg === '');";
|
||||
echo " if (errorMsg !== '') { errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' }); }";
|
||||
echo " }";
|
||||
echo " submitBtn.disabled = !isValid;";
|
||||
echo " submitBtn.setAttribute('aria-disabled', String(!isValid));";
|
||||
@@ -981,19 +980,16 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
|
||||
echo " if (successEl) {";
|
||||
echo " successEl.textContent = result.externalRef ? 'Bestellung erfolgreich erfasst! Bestellnummer: ' + result.externalRef : successDefaultText;";
|
||||
echo " successEl.classList.remove('hidden');";
|
||||
echo " successEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
|
||||
echo " }";
|
||||
echo " resetForm(true);";
|
||||
echo " } else if (errorEl) {";
|
||||
echo " errorEl.textContent = result.error || 'Unbekannter Fehler';";
|
||||
echo " errorEl.classList.remove('hidden');";
|
||||
echo " errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
|
||||
echo " }";
|
||||
echo " } catch (error) {";
|
||||
echo " if (errorEl) {";
|
||||
echo " errorEl.textContent = 'Netzwerkfehler: ' + error.message;";
|
||||
echo " errorEl.classList.remove('hidden');";
|
||||
echo " errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
|
||||
echo " }";
|
||||
echo " } finally {";
|
||||
echo " submitBtn.innerHTML = originalBtnText;";
|
||||
|
||||
Reference in New Issue
Block a user