1
0
Fork 0

Potential fix for weird carousel bug on Firefox

This commit is contained in:
Lim Chee Aun 2023-12-05 13:02:52 +08:00
parent 222786f202
commit 66746eb579
2 changed files with 16 additions and 0 deletions

View file

@ -1121,6 +1121,11 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
flex-grow: 1;
background-color: var(--backdrop-solid-color);
animation: appear 0.3s var(--timing-function) both;
transition: width 0.3s var(--timing-function);
&:only-child {
width: 100%;
}
}
.media-modal-container.loading {
display: flex;

View file

@ -142,6 +142,17 @@ function StatusPage(params) {
}
}, [showMediaOnly, closeLink, snapStates.prevLocation]);
useEffect(() => {
let timer = setTimeout(() => {
// carouselRef.current?.focus?.();
const $carousel = document.querySelector('.carousel');
if ($carousel) {
$carousel.focus();
}
}, 100);
return () => clearTimeout(timer);
}, [showMediaOnly]);
return (
<div class="deck-backdrop">
{showMedia ? (