Skip to content
Extraits de code Groupes Projets
Valider 1b56e7ab rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

Clicking too fast can result in nothingness

fixes #8845 #8319

FYI: We cannot use `$location.hash();` here as it would not return anything. The hash would be in this case after '#?this=is&search=true#thisIshash'. `$location.search` returns an object and cannot be used for such a comparison.

BTW: This is fixed in 3.0 branch already
parent a2f71ab8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -84,8 +84,10 @@ ...@@ -84,8 +84,10 @@
hash = hash.substring(1); hash = hash.substring(1);
} }
} }
if (hash) { if (location.hash === '#?' + hash) {
loadCurrentPage(); // it would not trigger a location change success event as URL is the same, call it manually
} else if (hash) {
$location.search(hash); $location.search(hash);
} else { } else {
// NOTE: this works around a bug in angularjs. when unsetting the hash (ie, removing in the URL), // NOTE: this works around a bug in angularjs. when unsetting the hash (ie, removing in the URL),
...@@ -98,4 +100,4 @@ ...@@ -98,4 +100,4 @@
setTimeout(function () { $rootScope.$apply(); }, 1); setTimeout(function () { $rootScope.$apply(); }, 1);
} }
} }
})(window, jQuery, broadcast); })(window, jQuery, broadcast);
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter