mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Increase timeout, but such hacky sadly
This commit is contained in:
parent
fe8eb74242
commit
e3c77cb516
1 changed files with 8 additions and 4 deletions
|
@ -246,8 +246,10 @@ function MediaModal({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
carouselRef.current.focus();
|
// Delay is needed for Safari, the focus stops it from scrolling
|
||||||
}, 100);
|
// 1000 is hypothetical
|
||||||
|
carouselRef.current?.focus();
|
||||||
|
}, 1000);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon icon="arrow-left" />
|
<Icon icon="arrow-left" />
|
||||||
|
@ -264,8 +266,10 @@ function MediaModal({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
carouselRef.current.focus();
|
// Delay is needed for Safari, the focus stops it from scrolling
|
||||||
}, 100);
|
// 1000 is hypothetical
|
||||||
|
carouselRef.current?.focus();
|
||||||
|
}, 1000);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon icon="arrow-right" />
|
<Icon icon="arrow-right" />
|
||||||
|
|
Loading…
Reference in a new issue