mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-18 12:08:17 +08:00
fix($location): re-assign history after BFCache back on Android browser
Closes #5425
This commit is contained in:
@@ -148,8 +148,9 @@ function Browser(window, document, $log, $sniffer) {
|
||||
* @param {boolean=} replace Should new url replace current history record ?
|
||||
*/
|
||||
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 (history !== window.history) history = window.history;
|
||||
|
||||
// setter
|
||||
if (url) {
|
||||
|
||||
Reference in New Issue
Block a user