Jump to content

window.location.hash breaks back button


rain13

Recommended Posts

Hello.

 

I use hash #fullscreen to tell javascript that gallery image should be shown in fullscreen mode. When I click on fullscreen button, the following line in ran:

window.location.hash = "fullscreen";

Now when I click back button, #fullscreen gets replaced by # and fullscreen mode does not go away because page is not reloaded. How to fix this problem?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...