Context menu only on keypress, or right-click of something with actions

This commit is contained in:
Nathan Gray 2014-01-11 15:20:11 +00:00
parent 8e69a1e23b
commit 881f8d254b

View File

@ -179,6 +179,8 @@ $j(document).ready(function() {
* Required to catch the context menu * Required to catch the context menu
*/ */
$j(window).on("contextmenu",document, function(event) { $j(window).on("contextmenu",document, function(event) {
// Check for actual key press
if(!(event.originalEvent.x == 1 && event.originalEvent.y == 1)) return true;
if(!event.ctrlKey && egw_keyHandler(EGW_KEY_MENU, event.shiftKey, event.ctrlKey || event.metaKey, event.altKey)) if(!event.ctrlKey && egw_keyHandler(EGW_KEY_MENU, event.shiftKey, event.ctrlKey || event.metaKey, event.altKey))
{ {
// If the key handler successfully passed the key event to some // If the key handler successfully passed the key event to some