Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…24_1
  • Loading branch information
tongsonbarbs committed Aug 16, 2024
2 parents e678259 + c87a48a commit 81fe232
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4697,3 +4697,38 @@ test('DataGrid - Data rows are skipped during Tab navigation if the first column
showBorders: true,
width: 300,
}));

test('DataGrid input cell should not put tabindex to incorrect element while on edit mode (T1239462)', async (t) => {
const dataGrid = new DataGrid('#container');
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

await t
.click(dataGrid.getToolbar().getItem(0))
.pressKey('tab');
await takeScreenshot('data-grid_keyboard-navigation-input-text-focused.png', dataGrid.element);

await t.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => {
await createWidget('dxDataGrid', {
showBorders: true,
selection: {
mode: 'multiple',
},
editing: {
mode: 'form',
allowAdding: true,
},
columns: [
'Calculation',
'CalculationType',
{
type: 'buttons',
fixed: true,
},
],
dataSource: {
store: [],
},
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ export const keyboardNavigationScrollableA11yExtender = (Base: ModuleType<Keyboa
private getFirstNotFixedCell(): dxElementWrapper | undefined {
const columns = this._columnsController.getVisibleColumns();
const columnIndex = columns.findIndex(({ fixed }) => !fixed);
const isEditing = this._editingController?.isEditing();

return columnIndex === -1
return columnIndex === -1 || isEditing
? undefined
: this._rowsView._getCellElement(0, columnIndex);
}
Expand Down

0 comments on commit 81fe232

Please sign in to comment.