Skip to content

Commit 3841e31

Browse files
committed
Merge pull request Templarian#13 from SuricateCan/master
Prevent right click propagation.
2 parents 98bc49e + 69dcd50 commit 3841e31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contextMenu.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ angular.module('ui.bootstrap.contextMenu', [])
2222
} else {
2323
var $a = $('<a>');
2424
$a.attr({ tabindex: '-1', href: '#' });
25-
var text = typeof item[0] == 'string' ? item[0] : item[0].call($scope, $scope, event);
25+
var text = typeof item[0] == 'string' ? item[0] : item[0].call($scope, $scope, event, model);
2626
$a.text(text);
2727
$li.append($a);
2828
var enabled = angular.isDefined(item[2]) ? item[2].call($scope, $scope, event, text, model) : true;
@@ -72,6 +72,7 @@ angular.module('ui.bootstrap.contextMenu', [])
7272
};
7373
return function ($scope, element, attrs) {
7474
element.on('contextmenu', function (event) {
75+
event.stopPropagation();
7576
$scope.$apply(function () {
7677
event.preventDefault();
7778
var options = $scope.$eval(attrs.contextMenu);

0 commit comments

Comments
 (0)