mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +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
04329151d2
commit
c81d8176cc
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