mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
Allow keyboard nav after clicking on buttons in media carousel
This commit is contained in:
parent
75cfd02134
commit
b0ed0be47d
1 changed files with 4 additions and 0 deletions
|
@ -176,6 +176,7 @@ function MediaModal({
|
|||
left: carouselRef.current.clientWidth * i,
|
||||
behavior: 'smooth',
|
||||
});
|
||||
carouselRef.current.focus();
|
||||
}}
|
||||
>
|
||||
•
|
||||
|
@ -245,6 +246,7 @@ function MediaModal({
|
|||
left: carouselRef.current.clientWidth * (currentIndex - 1),
|
||||
behavior: 'smooth',
|
||||
});
|
||||
carouselRef.current.focus();
|
||||
}}
|
||||
>
|
||||
<Icon icon="arrow-left" />
|
||||
|
@ -260,6 +262,7 @@ function MediaModal({
|
|||
left: carouselRef.current.clientWidth * (currentIndex + 1),
|
||||
behavior: 'smooth',
|
||||
});
|
||||
carouselRef.current.focus();
|
||||
}}
|
||||
>
|
||||
<Icon icon="arrow-right" />
|
||||
|
@ -272,6 +275,7 @@ function MediaModal({
|
|||
onClick={(e) => {
|
||||
if (e.target === e.currentTarget) {
|
||||
setShowMediaAlt(false);
|
||||
carouselRef.current.focus();
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Add table
Reference in a new issue