some small fixes

This commit is contained in:
Ralf Becker 2021-06-11 09:06:25 +02:00
parent e18832e110
commit ed1c35d28b
2 changed files with 5 additions and 3 deletions

View File

@ -15,6 +15,7 @@
*/ */
import {EGW_AO_EXEC_SELECTED} from "./egw_action.js"; import {EGW_AO_EXEC_SELECTED} from "./egw_action.js";
import {_egw_active_menu} from "./egw_menu.js";
/** /**
* Define the key constants (IE doesn't support "const" keyword) * Define the key constants (IE doesn't support "const" keyword)
@ -147,7 +148,7 @@ function _egw_nodeIsInInput(_node)
/** /**
* Register the onkeypress handler on the document * Register the onkeypress handler on the document
*/ */
jQuery(document).ready(function() { jQuery(function() {
// Fetch the key down event and translate it into browser-independent and // Fetch the key down event and translate it into browser-independent and
// easy to use key codes and shift states // easy to use key codes and shift states
@ -165,7 +166,8 @@ jQuery(document).ready(function() {
if(jQuery(e.target).parents("#egw_fw_sidemenu").length > 0) return; if(jQuery(e.target).parents("#egw_fw_sidemenu").length > 0) return;
// If a context menu is open, give the keyboard to it // If a context menu is open, give the keyboard to it
if(_egw_active_menu !== null && _egw_active_menu.keyHandler(keyCode, e.shiftKey, e.ctrlKey || e.metaKey, e.altKey)) if (typeof _egw_active_menu !== undefined && _egw_active_menu &&
_egw_active_menu.keyHandler(keyCode, e.shiftKey, e.ctrlKey || e.metaKey, e.altKey))
{ {
e.preventDefault(); e.preventDefault();
return; return;

View File

@ -17,7 +17,7 @@
/api/js/jquery/jquery-ui-timepicker-addon.js; /api/js/jquery/jquery-ui-timepicker-addon.js;
/vendor/bower-asset/jquery-touchswipe/jquery.touchSwipe.js; /vendor/bower-asset/jquery-touchswipe/jquery.touchSwipe.js;
/vendor/egroupware/magicsuggest/magicsuggest.js; /vendor/egroupware/magicsuggest/magicsuggest.js;
/api/js/jquery/jquery.splitter.js; /api/js/jquery/splitter.js;
/api/js/jquery/blueimp/js/blueimp-gallery.min.js; /api/js/jquery/blueimp/js/blueimp-gallery.min.js;
*/ */
jQuery.noConflict(); jQuery.noConflict();