117
rated 0 times
[
124]
[
7]
/ answers: 1 / hits: 18186
/ 10 Years ago, sun, may 11, 2014, 12:00:00
Like the title says, I'm not sure why $event.preventDefault()
is not preventing the context menu from appearing on right click.
I've written this simple example in plunker to demonstrate the problem.
Html:
<body ng-controller=MainCtrl>
<div id=me ng-mousedown=stopContext($event)>CLICK ME {{num}}</div>
</body>
Javascript:
$scope.stopContext = function(ev) {
$scope.num += 1;
ev.preventDefault();
};
Thanks in advance.
More From » angularjs