mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added visible frame index
This commit is contained in:
parent
532703a04c
commit
b86e11654c
1 changed files with 1 additions and 2 deletions
|
@ -60,8 +60,7 @@ const IframeBuffering: React.FC<IframeBufferingProps> = ({generateContent, class
|
|||
}, [visibleIframeIndex, iframes]);
|
||||
|
||||
useEffect(() => {
|
||||
const invisibleIframeIndex = visibleIframeIndex === 0 ? 1 : 0;
|
||||
const iframe = iframes[invisibleIframeIndex].current;
|
||||
const iframe = iframes[visibleIframeIndex].current;
|
||||
|
||||
if (iframe) {
|
||||
iframe.contentWindow?.scrollTo(0, scrollPosition);
|
||||
|
|
Loading…
Add table
Reference in a new issue