Ensure history state change on showPage

Fix #9
This commit is contained in:
Ray Schamp 2015-05-11 10:40:48 -04:00
parent 43a98d6f4a
commit 8a84040be9

View file

@ -352,6 +352,13 @@ function showPage(path) {
if ($toShow.is(Scratch.FlashApp.$ASobj)) { if ($toShow.is(Scratch.FlashApp.$ASobj)) {
$toShow.css({top: 0}); $toShow.css({top: 0});
} }
if (document.location.hash.substr(1) != path) {
if (path != "home") {
document.location.hash = '#' + path;
} else {
document.location.hash = '';
}
}
} }