mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 14:33:22 +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);
|
||||
|
||||
element.bind('contextmenu', function(e) {
|
||||
scope.$apply(function() {
|
||||
e.preventDefault();
|
||||
fn(scope, { $event: e });
|
||||
});
|
||||
if (!e.shiftKey) {
|
||||
scope.$apply(function() {
|
||||
e.preventDefault();
|
||||
fn(scope, { $event: e });
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user