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

Commit c81d817

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 0432915 commit c81d817

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

src/ng/directive/a.js

+1
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)