Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,36 @@ test('The expand cell should not lose focus on expanding a master row (T892203)'
},
columns: ['a', 'b'],
}));

test(`${editMode} mode - Shift+Tab from the first editable cell should move focus to the last header (T1329750)`, async (t) => {
const dataGrid = new DataGrid('#container') as any;
const cell00 = dataGrid.getDataCell(0, 0);
const editor00 = cell00.getEditor();
const lastHeaderCell = dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(1);

await t.expect(dataGrid.isReady()).ok();

await t
.click(cell00.element)

.expect(cell00.isFocused).ok()
.expect(editor00.element.focused)
.ok()

.pressKey('shift+tab')

.expect(cell00.isFocused)
.notOk()
.expect(lastHeaderCell.element.focused)
.ok();
}).before(async () => createWidget('dxDataGrid', {
dataSource: [{ a: '1', b: '2' }],
editing: {
mode: editMode.toLowerCase() as any,
allowUpdating: true,
},
columns: ['a', 'b'],
}));
});

test('Horizontal moving by keydown if scrolling.columnRenderingMode: virtual', async (t) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,9 @@ export class KeyboardNavigationController extends KeyboardNavigationControllerCo
this._editorFactory.loseFocus();

if (this._editingController.isEditing() && !this.isRowEditMode()) {
// Focus the cell before closing the editor on native Tab-out,
// so the browser's native Shift+Tab leaves from a stable anchor.
Comment thread
anna-shakhova marked this conversation as resolved.
($cell.get(0) as HTMLElement | undefined)?.focus({ preventScroll: true });
this._resetFocusedCell(true);
this._resetFocusedView();
this._closeEditCell();
Expand Down
Loading