mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 01:05:34 +03:00
Fix carousel bug: focus first then scroll
This commit is contained in:
parent
5be052dd4d
commit
d246e45be6
1 changed files with 1 additions and 1 deletions
|
@ -260,8 +260,8 @@ function MediaModal({
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
const left =
|
const left =
|
||||||
carouselRef.current.clientWidth * i * (isRTL() ? -1 : 1);
|
carouselRef.current.clientWidth * i * (isRTL() ? -1 : 1);
|
||||||
carouselRef.current.scrollTo({ left, behavior: 'smooth' });
|
|
||||||
carouselRef.current.focus();
|
carouselRef.current.focus();
|
||||||
|
carouselRef.current.scrollTo({ left, behavior: 'smooth' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon icon="round" size="s" alt="⸱" />
|
<Icon icon="round" size="s" alt="⸱" />
|
||||||
|
|
Loading…
Reference in a new issue