Fix back button behavior for hash redirects

A URL that starts with a hash is of the old GWTUI format, and should
redirect to the new PolyGerrit style without the hash. The current
implementation called page(newUrl), which adds another entry to the
browser history. Using page.redirect(newUrl) instead modifies the
history in place, enabling the expected back button behavior.

Bug: Issue 6693
Change-Id: I9e0503808332528c7b86ff24ddeb89d56dcf4c09
(cherry picked from commit 63d7e35f10)
This commit is contained in:
Kasper Nilsson 2017-07-17 13:00:03 -07:00 committed by Paladox none
parent 18bb5d94c9
commit 8517b2b833
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@
if (hash.indexOf('/VE/') === 0) {
newUrl = base + '/settings' + data.hash;
}
page(newUrl);
page.redirect(newUrl);
return;
}
restAPI.getLoggedIn().then(function(loggedIn) {