From 905e85a8ea1aeb3e204195910258e50f013c9ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Gla=CC=88ser?= Date: Wed, 14 Oct 2026 13:16:19 +0200 Subject: [PATCH] Clean up multiselect pulldown pattern --- patterns/multiselektions-pulldown.html | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/patterns/multiselektions-pulldown.html b/patterns/multiselektions-pulldown.html index 3e5f62a..f81c525 100644 --- a/patterns/multiselektions-pulldown.html +++ b/patterns/multiselektions-pulldown.html @@ -502,36 +502,12 @@ } }); - demo.dataset.align = 'left'; demo.dataset.open = String(nextState); trigger.setAttribute('aria-expanded', String(nextState)); if (!nextState) { return; } - - const panel = demo.querySelector('.sg-pulldown-panel'); - if (!panel) { - return; - } - - demo.dataset.align = 'left'; - panel.style.left = '0px'; - panel.style.right = 'auto'; - - const initialRect = panel.getBoundingClientRect(); - let offsetX = 0; - const maxRight = window.innerWidth; - - if (initialRect.right > maxRight) { - offsetX -= initialRect.right - maxRight; - } - - if (initialRect.left + offsetX < 0) { - offsetX += 0 - (initialRect.left + offsetX); - } - - panel.style.left = `${offsetX}px`; }); });