Closed adirkandel closed 3 years ago
Same problem. Strange ... Why move the scroll when destroying?
Its fixed in sibling plugin https://github.com/sachinchoolur/lightGallery/blob/master/dist/js/lightgallery.js#L1285 so I just comment out this lines and it works
@sachinchoolur Could you please fix it also here? Thank you
I have the same issue. I need to destroy lightgallery to refresh images. As I can see now it is the only way.
This issue has been automatically marked as stale because it has not had recent activity. If the issue is still valid for version 2.x, please re-open. Apologize for not responding on time. Thank you for your contributions.
When i destroy the gallery it gets to these 2 lines: document.body.scrollTop = _this.prevScrollTop; document.documentElement.scrollTop = _this.prevScrollTop;
but _this.prevScrollTop is undefined the window scrolls to 0, means the top of the scroll position.