Fix arrows gone missing in carousel

This commit is contained in:
Lim Chee Aun 2023-04-17 14:41:40 +08:00
parent d35ffafe4b
commit 2dde64e740
2 changed files with 10 additions and 0 deletions

View file

@ -1009,6 +1009,9 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
:is(.carousel-top-controls, .carousel-controls)[hidden] {
opacity: 0;
}
.carousel-controls {
top: 45%;
}
:is(.button, button).carousel-button,
button.carousel-dot {

View file

@ -84,6 +84,13 @@ function MediaModal({
};
}, []);
useEffect(() => {
let timer = setTimeout(() => {
carouselRef.current?.focus?.();
}, 100);
return () => clearTimeout(timer);
}, []);
return (
<div class="media-modal-container">
<div