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 04329151d2
commit c81d8176cc

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