aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgtpep2012-07-27 01:26:46 +0400
committerMisko Hevery2012-09-06 15:54:20 -0700
commit67db7616ad740f3638734e6af7cee92401585293 (patch)
treef988e5242b0a5a9a8278c29df6c6bcb828781129
parent3d7c752e276f67af6b3bd343babe3606bde1bebe (diff)
downloadangular.js-67db7616ad740f3638734e6af7cee92401585293.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
}
});
}