Answer the question
In order to leave comments, you need to log in
When deploying a video from YouTube, it throws it to the top of the page?
Such a problem: I have a carousel from a youtube video, when I click "Full screen" and then minimize the video, for some reason it throws me to the top of the page, and does not return to the section of the page where the videos are located. What is it connected with and how to fix it?
Answer the question
In order to leave comments, you need to log in
This may be due to the fact that somewhere in the code it is body
hung on overflow: hidden;
to remove the ability to scroll on the page while the video is open.
But if you remove from body
overflow: hidden;
, then the page will rise up.
I solved this problem by locking the scroll with this good library: scroll-lock (github)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question