From c81d8176cc55cd15acae05259ead73f90a01f0b7 Mon Sep 17 00:00:00 2001 From: sgtpep Date: Fri, 27 Jul 2012 01:26:46 +0400 Subject: [PATCH] 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. --- src/ng/directive/a.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ng/directive/a.js b/src/ng/directive/a.js index 340bceb7dc49..0cd04ec4170c 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 } }); }