Api: Fix sidebox category expand/collapse on click, broken in 45e477f0c0

This commit is contained in:
nathangray 2021-05-17 10:02:23 -06:00
parent b32727df9b
commit a615b2dd9c

View File

@ -878,7 +878,7 @@ function egw_fw_ui_category(_contDiv, _name, _title, _content, _callback, _anima
this.headerDiv._parent = this;
jQuery(this.headerDiv).on("click keydown",
function(e) {
if([EGW_KEY_ENTER, EGW_KEY_SPACE].indexOf(e.which) == -1) return;
if(e.type == "keydown" && [EGW_KEY_ENTER, EGW_KEY_SPACE].indexOf(e.which) == -1) return;
if (!jQuery(this).hasClass('egw_fw_ui_category_active'))
{
this._parent.open(false);