can delete notifications using the keyboard

This commit is contained in:
daria 2023-11-28 15:19:14 +02:00
parent f82ee3c79c
commit eb350a7463
1 changed files with 12 additions and 2 deletions

View File

@ -1597,11 +1597,21 @@ define([
} else {
// Click on <a> with an href
if (e.type === 'keydown'){
$el.get(0).click();
$el.find('.cp-clickable').first().click();
if ($el.find('.cp-clickable')) {
$el.find('.cp-clickable').first().click();
}
else{
$el.get(0).click();
}
}
}
}
if(e.type === 'keydown' && e.keyCode === 46){
e.stopPropagation();
if ($el.find('.cp-clickable')) {
$el.find('.cp-clickable').last().click();
}
}
};
$li.on('click keydown', onAction);
});