mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-25 02:40:24 +00:00
fix(a): prevent Opera from incorrectly navigating on link click
we handle the navigation by ourselves, so we need to prevent the default action. Opera ignores event.preventDefault() call so we must return false.
This commit is contained in:
parent
3d7c752e27
commit
67db7616ad
1 changed files with 1 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ var htmlAnchorDirective = valueFn({
|
|||
// if we have no href url, then don't navigate anywhere.
|
||||
if (!element.attr('href')) {
|
||||
event.preventDefault();
|
||||
return false; // Needed for opera
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue