diff --git a/src/js/boards.js b/src/js/boards.js index 44aaa82..941e316 100644 --- a/src/js/boards.js +++ b/src/js/boards.js @@ -270,8 +270,22 @@ function bindBoardListEvents(list, board) { } // ---- MODALS ---- -function openModal(id) { document.getElementById(id).classList.add('active'); } -function closeModal(id) { document.getElementById(id).classList.remove('active'); } +// reduced-motion kappt das Fade ueber den ungeschichteten @media-Block. +// Feature-Detection-Fallback (Firefox < 144): instant. +function openModal(id) { + if (document.startViewTransition) { + document.startViewTransition(() => document.getElementById(id).classList.add('active')); + } else { + document.getElementById(id).classList.add('active'); + } +} +function closeModal(id) { + if (document.startViewTransition) { + document.startViewTransition(() => document.getElementById(id).classList.remove('active')); + } else { + document.getElementById(id).classList.remove('active'); + } +} function openAddBoardModal() { document.getElementById('newBoardName').value = '';