Skip to content

Commit 67db761

Browse files
sgtpepmhevery
sgtpep
authored andcommitted
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.
1 parent 3d7c752 commit 67db761

File tree

1 file changed

+1
-0
lines changed
  • src/ng/directive

1 file changed

+1
-0
lines changed

src/ng/directive/a.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var htmlAnchorDirective = valueFn({
2727
// if we have no href url, then don't navigate anywhere.
2828
if (!element.attr('href')) {
2929
event.preventDefault();
30+
return false; // Needed for opera
3031
}
3132
});
3233
}

0 commit comments

Comments
 (0)