mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 00:33:03 +00:00
Use default right-click action when SHIFT key is held
This commit is contained in:
@@ -3,10 +3,12 @@ angular.module('app').directive('contextMenu', ['$parse', function($parse) {
|
|||||||
var fn = $parse(attrs.contextMenu);
|
var fn = $parse(attrs.contextMenu);
|
||||||
|
|
||||||
element.bind('contextmenu', function(e) {
|
element.bind('contextmenu', function(e) {
|
||||||
|
if (!e.shiftKey) {
|
||||||
scope.$apply(function() {
|
scope.$apply(function() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
fn(scope, { $event: e });
|
fn(scope, { $event: e });
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
Reference in New Issue
Block a user