Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fixes #5198 to avoid calling indexOf() on SVGAnimatedString instances #5199

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/ng/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,16 +629,19 @@ function $LocationProvider(){
}

var absHref = elm.prop('href');
var rewrittenUrl = $location.$$rewrite(absHref);

if (absHref && !elm.attr('target') && rewrittenUrl && !event.isDefaultPrevented()) {
event.preventDefault();
if (rewrittenUrl != $browser.url()) {
// update location manually
$location.$$parse(rewrittenUrl);
$rootScope.$apply();
// hack to work around FF6 bug 684208 when scenario runner clicks on links
window.angular['ff-684208-preventDefault'] = true;
// test for string to avoid SVGAnimatedString
if (absHref && angular.isString(absHref)) {
var rewrittenUrl = $location.$$rewrite(absHref);

if (!elm.attr('target') && rewrittenUrl && !event.isDefaultPrevented()) {
event.preventDefault();
if (rewrittenUrl != $browser.url()) {
// update location manually
$location.$$parse(rewrittenUrl);
$rootScope.$apply();
// hack to work around FF6 bug 684208 when scenario runner clicks on links
window.angular['ff-684208-preventDefault'] = true;
}
}
}
});
Expand Down