Lightbox scrolling to top of page upon cloesout

I have created lightbox’s for various images on my website, basically what I want it to do is for the user to click the image and for a lightbox to pop up a large version of the photo for a better view. Then the user will close out the lightbox and resume browsing. However, it appears as though upon closeout of the lightbox it is automatically reloading the page and putting the user back to the top of the page causing them to have to scroll back down on the page. How can I get this to stay on the location that the user was on?

I am using Wix Editor X.

I’ve googled a lot, searched and have found no solutions. Any help on this would be greatly appreciated!

Is there code for the lightbox? If so can you share it? Lightboxes should not be causing the page to reload by themselves.