Skip to content

Commit c81d817

Browse files
sgtpepmhevery
authored andcommitted
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.
1 parent 0432915 commit c81d817

File tree

1 file changed

+1
-0
lines changed
  • src/ng/directive

1 file changed

+1
-0
lines changed

src/ng/directive/a.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var htmlAnchorDirective = valueFn({
2727
// if we have no href url, then don't navigate anywhere.
2828
if (!element.attr('href')) {
2929
event.preventDefault();
30+
return false; // Needed for opera
3031
}
3132
});
3233
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy