Show browser context menu when you ctrl + right click

This commit is contained in:
Nathan Gray 2013-04-10 09:03:08 +00:00
parent 4c54745cbb
commit 93eacb1b13
2 changed files with 7 additions and 5 deletions

View File

@ -235,18 +235,18 @@ function egwPopupActionImplementation()
{
_egw_active_menu.hide()
}
else
else if (!e.ctrlKey)
{
_xy = ai._getPageXY(e);
_callback.call(_context, _xy, ai);
}
e.cancelBubble = true;
if (e.stopPropagation)
e.cancelBubble = !e.ctrlKey;
if (e.stopPropagation && !e.ctrlKey)
{
e.stopPropagation();
}
return false;
return e.ctrlKey;
}
if (egwIsMobile()) {

View File

@ -179,12 +179,14 @@ $j(document).ready(function() {
* Required to catch the context menu
*/
$j(window).on("contextmenu",document, function(event) {
if(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
// sub component, prevent the default action
event.preventDefault();
return false;
}
return true;
});