aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgtpep2012-07-27 01:26:46 +0400
committerMisko Hevery2012-09-06 16:06:27 -0700
commitc81d8176cc55cd15acae05259ead73f90a01f0b7 (patch)
treeacc8b7fec7ef99094247662cf0fe1b0883e14a82
parent04329151d2df833f803629cefa781aa6409fe6a5 (diff)
downloadangular.js-c81d8176cc55cd15acae05259ead73f90a01f0b7.tar.bz2
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.
-rw-r--r--src/ng/directive/a.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ng/directive/a.js b/src/ng/directive/a.js
index 340bceb7..0cd04ec4 100644
--- a/src/ng/directive/a.js
+++ b/src/ng/directive/a.js
@@ -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
}
});
}