Bandcamp gives you html for an iframe to embed music onto your website
When a user clicks on a song in the iframe, something happens and I'm not sure what. The parent URL doesn't change and it doesn't appear that popState nor pushState have been fired but the user is left with an 'extra' state? (the iframe doesn't appear to change its URL either)
Pressing the back button at this point does nothing and the popState event listener doesn't fire. If the user then clicks the back button again, it reacts like normal, with a popState event.
I understand that since the iframe isn't on my domain I'm pretty much out of luck by the sounds of it. I've tried some suggestions to listen to the pushState event which works, but doesn't fire in this circumstance
Here's my example: https://codepen.io/mugRuncher/pen/wvqJNJb
<iframe style="border: 0; width: 350px; height: 786px;" src="https://bandcamp.com/EmbeddedPlayer/album=3118567546/size=large/bgcol=ffffff/linkcol=0687f5/transparent=true/" seamless><a href="https://daysndaze.bandcamp.com/album/show-me-the-blueprints">Show Me The Blueprints. by Days N Daze</a></iframe>
Load my example ^ click a song > click the back button and you will see what I'm talking about
Note: if you click anything other than a song from the list, this will not happen
Adding a # at the end of the URL in the src attribute of the iframe fixes the issue:
This will set the iframe into the state that it will want to advance to