mirror of https://github.com/xwiki-labs/cryptpad
add kanban button is keyboard accessible
This commit is contained in:
parent
d2adb5d068
commit
8397234933
|
@ -899,6 +899,7 @@ define([
|
||||||
if (migrated) { framework.localChange(); }
|
if (migrated) { framework.localChange(); }
|
||||||
|
|
||||||
var addBoardDefault = document.getElementById('kanban-addboard');
|
var addBoardDefault = document.getElementById('kanban-addboard');
|
||||||
|
$(addBoardDefault).attr('tabindex', 0);
|
||||||
$(addBoardDefault).attr('title', Messages.kanban_addBoard);
|
$(addBoardDefault).attr('title', Messages.kanban_addBoard);
|
||||||
addBoardDefault.addEventListener('click', function () {
|
addBoardDefault.addEventListener('click', function () {
|
||||||
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
if (framework.isReadOnly() || framework.isLocked()) { return; }
|
||||||
|
@ -920,6 +921,11 @@ define([
|
||||||
});
|
});
|
||||||
kanban.onChange();
|
kanban.onChange();
|
||||||
});
|
});
|
||||||
|
document.addEventListener('keydown', function (event) {
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
addBoardDefault.click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var $container = $('#cp-app-kanban-content');
|
var $container = $('#cp-app-kanban-content');
|
||||||
var $cContainer = $('#cp-app-kanban-container');
|
var $cContainer = $('#cp-app-kanban-container');
|
||||||
|
|
Loading…
Reference in New Issue