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.
This commit is contained in:
sgtpep 2012-07-27 01:26:46 +04:00 committed by Misko Hevery
parent 3d7c752e27
commit 67db7616ad

View file

@ -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
}
});
}