mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-08 23:04:45 +00:00
fix($location): re-assign history after BFCache back on Android browser
Closes #5425
This commit is contained in:
parent
80e7a45584
commit
bddd46c8ec
1 changed files with 2 additions and 1 deletions
|
|
@ -148,8 +148,9 @@ function Browser(window, document, $log, $sniffer) {
|
||||||
* @param {boolean=} replace Should new url replace current history record ?
|
* @param {boolean=} replace Should new url replace current history record ?
|
||||||
*/
|
*/
|
||||||
self.url = function(url, replace) {
|
self.url = function(url, replace) {
|
||||||
// Android Browser BFCache causes location reference to become stale.
|
// Android Browser BFCache causes location, history reference to become stale.
|
||||||
if (location !== window.location) location = window.location;
|
if (location !== window.location) location = window.location;
|
||||||
|
if (history !== window.history) history = window.history;
|
||||||
|
|
||||||
// setter
|
// setter
|
||||||
if (url) {
|
if (url) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue