make tabbing through SlickGrid more accessible
This change makes it so you can tab out of the SlickGrid when you are on the last cell. This change also makes it so enter takes you to the top of the next column. fixes CNVS-18686 refs CNVS-17043 Test Plan: - Import a CSV into the gradebook, regardless of which one. - Get to the final results page, where it will ask you to save. - You should be able to reach the submit/save/etc. buttons with only the keyboard. - Please also check using the test plan for CNVS-17043 since this commit actually adds this functionality into Canvas: - In the gradebook press the enter key while editing the bottom row of a column. - Focus should go to the top of the next column. Change-Id: Ie9add59ccc1873708cfd45df7fdc7f8032aa7cb1 Reviewed-on: https://gerrit.instructure.com/52784 Tested-by: Jenkins Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com> QA-Review: Nathan Rogowski <nathan@instructure.com> Product-Review: Strand McCutchen <smccutchen@instructure.com>
This commit is contained in:
parent
c59cd4636d
commit
d804163c7d
|
@ -3511,9 +3511,17 @@ if (typeof Slick === "undefined") {
|
|||
setActiveCellInternal(getCellNode(pos.row, pos.cell));
|
||||
activePosX = pos.posX;
|
||||
return true;
|
||||
} else {
|
||||
setActiveCellInternal(getCellNode(activeRow, activeCell));
|
||||
return false;
|
||||
} else if (activeRow === getDataLength() - 1) {
|
||||
if ( activeCell === columns.length - 1 ) {
|
||||
// When focus is on the last cell in a row
|
||||
// and the last cell in a column.
|
||||
// Move focus outside of SlickGrid.
|
||||
return false;
|
||||
}
|
||||
// Otherwise, when focus is on the last cell in a column.
|
||||
// Move focus to the first cell of the next column.
|
||||
setActiveCell(0, activeCell + 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue