From 5a0be0e8865167795ba81f51e86858c62241646c Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 12 Apr 2026 18:27:30 +0200 Subject: [PATCH] Fix: Toasts verschwinden jetzt (doppeltes ease + Fallback-Timeout) CSS: var(--transition-normal) enthielt bereits 'ease', dadurch 'toast-out 200ms ease ease' = ungueltig, animationend feuert nie. JS: setTimeout-Fallback nach 300ms als Sicherheitsnetz. Co-Authored-By: Claude Sonnet 4.6 --- backend/static/css/components.css | 4 ++-- backend/static/js/ui.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/static/css/components.css b/backend/static/css/components.css index 30dedb0..afdcb80 100644 --- a/backend/static/css/components.css +++ b/backend/static/css/components.css @@ -409,7 +409,7 @@ textarea.form-control { font-size: var(--text-sm); font-weight: var(--weight-medium); pointer-events: auto; - animation: toast-in var(--transition-normal) ease forwards; + animation: toast-in 200ms ease forwards; } .toast-success { background: var(--c-success); } @@ -425,7 +425,7 @@ textarea.form-control { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-8px) scale(0.96); } } -.toast.removing { animation: toast-out var(--transition-normal) ease forwards; } +.toast.removing { animation: toast-out 200ms ease forwards; } /* ------------------------------------------------------------ 8. MODAL diff --git a/backend/static/js/ui.js b/backend/static/js/ui.js index adda56e..cdf00cd 100644 --- a/backend/static/js/ui.js +++ b/backend/static/js/ui.js @@ -29,7 +29,8 @@ const UI = (() => { function remove(el) { el.classList.add('removing'); - el.addEventListener('animationend', () => el.remove(), { once: true }); + const fallback = setTimeout(() => el.remove(), 300); + el.addEventListener('animationend', () => { clearTimeout(fallback); el.remove(); }, { once: true }); } return {