OTC-Fenster nicht durch Hintergrundklick schliessen

This commit is contained in:
gitea_admin committed 2026-09-06 15:46:02 +02:00
1 parent 88dbb008d2
commit b1fdf99e91
1 file changed
-15
-15
View File
@@ -1239,7 +1239,6 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
echo " const clearSuccess = () => {";
echo " if (successEl) { successEl.textContent = successDefaultText; successEl.classList.add('hidden'); }";
echo " };";
echo " let backdropPointerDown = false;";
echo " const getTodayValue = () => {";
echo " const now = new Date();";
echo " const year = now.getFullYear();";
@@ -1330,9 +1329,6 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
echo " confirmationCard.hidden = false;";
echo " requestAnimationFrame(() => confirmationSubmit.focus());";
echo " };";
echo " overlay.addEventListener('pointerdown', (event) => {";
echo " backdropPointerDown = event.target === overlay;";
echo " });";
echo " document.addEventListener('click', (event) => {";
echo " const openTrigger = event.target.closest('[data-otc-order-open]');";
echo " if (openTrigger) {";
@@ -1346,17 +1342,6 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
echo " toggleOverlay(false);";
echo " }";
echo " });";
echo " overlay.addEventListener('click', (event) => {";
echo " if (event.target === overlay && backdropPointerDown) {";
echo " toggleOverlay(false);";
echo " }";
echo " backdropPointerDown = false;";
echo " });";
echo " document.addEventListener('keydown', (event) => {";
echo " if (event.key === 'Escape' && overlay.dataset.open === 'true') {";
echo " toggleOverlay(false);";
echo " }";
echo " });";
echo " [orderDateInput, firstNameInput, lastNameInput, streetInput, houseNumberInput, zipInput, cityInput].forEach((input) => {";
echo " if (!input) { return; }";
echo " input.addEventListener('input', updateFormState);";