mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix keyboard navigation for sidebar
This commit is contained in:
parent
a8afdb0cdc
commit
a5b8f7e02f
@ -293,7 +293,8 @@ define([
|
||||
Object.keys(categories).forEach(function (key) {
|
||||
var $category = $('<div>', {
|
||||
'class': 'cp-sidebarlayout-category',
|
||||
'data-category': key
|
||||
'data-category': key,
|
||||
'tabindex': 0
|
||||
}).appendTo($categories);
|
||||
var iconClass = icons[key];
|
||||
if (iconClass) {
|
||||
@ -303,8 +304,7 @@ define([
|
||||
if (key === active) {
|
||||
$category.addClass('cp-leftside-active');
|
||||
}
|
||||
|
||||
$category.click(function () {
|
||||
Util.onClickEnter($category, function () {
|
||||
if (!Array.isArray(categories[key]) && categories[key].onClick) {
|
||||
categories[key].onClick();
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user