OTC-Fenster nicht durch Hintergrundklick schliessen
This commit is contained in:
1 parent
88dbb008d2
commit
b1fdf99e91
1 file changed
-15
@@ -1239,7 +1239,6 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
|
|||||||
echo " const clearSuccess = () => {";
|
echo " const clearSuccess = () => {";
|
||||||
echo " if (successEl) { successEl.textContent = successDefaultText; successEl.classList.add('hidden'); }";
|
echo " if (successEl) { successEl.textContent = successDefaultText; successEl.classList.add('hidden'); }";
|
||||||
echo " };";
|
echo " };";
|
||||||
echo " let backdropPointerDown = false;";
|
|
||||||
echo " const getTodayValue = () => {";
|
echo " const getTodayValue = () => {";
|
||||||
echo " const now = new Date();";
|
echo " const now = new Date();";
|
||||||
echo " const year = now.getFullYear();";
|
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 " confirmationCard.hidden = false;";
|
||||||
echo " requestAnimationFrame(() => confirmationSubmit.focus());";
|
echo " requestAnimationFrame(() => confirmationSubmit.focus());";
|
||||||
echo " };";
|
echo " };";
|
||||||
echo " overlay.addEventListener('pointerdown', (event) => {";
|
|
||||||
echo " backdropPointerDown = event.target === overlay;";
|
|
||||||
echo " });";
|
|
||||||
echo " document.addEventListener('click', (event) => {";
|
echo " document.addEventListener('click', (event) => {";
|
||||||
echo " const openTrigger = event.target.closest('[data-otc-order-open]');";
|
echo " const openTrigger = event.target.closest('[data-otc-order-open]');";
|
||||||
echo " if (openTrigger) {";
|
echo " if (openTrigger) {";
|
||||||
@@ -1346,17 +1342,6 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
|
|||||||
echo " toggleOverlay(false);";
|
echo " toggleOverlay(false);";
|
||||||
echo " }";
|
echo " }";
|
||||||
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 " [orderDateInput, firstNameInput, lastNameInput, streetInput, houseNumberInput, zipInput, cityInput].forEach((input) => {";
|
||||||
echo " if (!input) { return; }";
|
echo " if (!input) { return; }";
|
||||||
echo " input.addEventListener('input', updateFormState);";
|
echo " input.addEventListener('input', updateFormState);";
|
||||||
|
|||||||
Reference in new issue
Block a user