I am using html5 fullscreen api to make a div fullscreen. Based on user interaction/navigation url changes using window.history.pushState
but as soon as I change the URL, page exits the fullscreen mode.
And it is happening on all the sites not just my app.
Steps to reproduce:
- Goto http://davidwalsh.name/demo/fullscreen.php (A nice demo)
- Then hit
Launch fullscreen
- Now using chrome/ff console try changing the url using
window.history.pushState
- Use following code
window.history.pushState(window.location.origin, "show", '/myNewPath');
Now you would notice that URL changes but fullscreen mode exits. Am I doing something wrong here? Let me know if you guys need more info.