Fix carousel bug: focus first then scroll

pull/904/head
Lim Chee Aun 2024-10-27 20:40:52 +08:00
rodzic 5be052dd4d
commit d246e45be6
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -260,8 +260,8 @@ function MediaModal({
e.stopPropagation();
const left =
carouselRef.current.clientWidth * i * (isRTL() ? -1 : 1);
carouselRef.current.scrollTo({ left, behavior: 'smooth' });
carouselRef.current.focus();
carouselRef.current.scrollTo({ left, behavior: 'smooth' });
}}
>
<Icon icon="round" size="s" alt="⸱" />