How to solve the problem of returning to the top when closing the Bootstrap modal.

If you are experiencing problems with closing the Bootstrap modal and returning to the top of the page, the following code modification can help.

<a class="modal-button" data-toggle="modal" data-target=".brand-story" href=""> 
 <img class="lazyload play-movie" data-src="renew/ img/play-movie.svg" alt="BRAND STORY PLAY MOVIE"> 
</a>

The problem was that .play-movie had position: absolute set. We solved that by setting position: absolute to .modal-button.

The specific cause is unknown, but I hope this solution helps.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top