diff --git a/src/lib/components/ui/tabs/tabs-list.svelte b/src/lib/components/ui/tabs/tabs-list.svelte index 782aa99..0df3c6e 100644 --- a/src/lib/components/ui/tabs/tabs-list.svelte +++ b/src/lib/components/ui/tabs/tabs-list.svelte @@ -17,7 +17,7 @@ let postBlur = false; // When the tabs are scrolled it will determine whether or not to show the blur at the end - const scroll = () => { + const handle_blur = () => { if (el.offsetWidth + el.scrollLeft < el.scrollWidth) { postBlur = true; } else { @@ -32,15 +32,12 @@ }; onMount(() => { - scroll(); // initially determine blur state - el.addEventListener('scroll', scroll); // on:scroll listener doesn't work on TabsPrimitive - - return () => { - el.removeEventListener('scroll', scroll); - }; + handle_blur(); // initially determine blur state }); + +