ressio / lazy-load-xt

Lazy load XT is a jQuery plugin for images, videos and other media
http://ress.io/lazy-load-xt-jquery/
MIT License
1.36k stars 245 forks source link

Broken Back-Button on posts with multiple YouTube embeds #96

Open darkhydra90 opened 7 years ago

darkhydra90 commented 7 years ago

Hi,

I have the following problem: on posts/pages with multiple YouTube embeds the browser's back-button (i.e. get back to previous site) breaks. As you scroll down, the plugin seems to create a "back-point" at every video player. So when you press the back-button in your browser it doesn't bring you to the previous site. Instead, it will reset the YouTube embeds and make them disappear one by one. You can get back to the previous site, by pressing the back button one time for every YouTube embed that was loaded. So if you scroll to the bottom of a post with 10 embeds you'd have to press back 11 times to actually get back to where you were before. This is very very bad for usability.

Is there a fix for this?

I have tested with the following browsers/devices (tested on http://ressio.github.io/lazy-load-xt/demo/youtube-iframe.htm):

BROKEN WITH:

WORKING WITH: