Skip to content
Open
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 @@ -239,6 +239,7 @@ export class KeyboardNavigationController extends KeyboardNavigationControllerCo
const isCell = $element.is('td');
const needSetFocusPosition = (this.option('focusedRowIndex') ?? -1) < 0;
if (isCell && needSetFocusPosition) {
this._focusView();
this._updateFocusedCellPosition($element);
}
Comment on lines 241 to 244
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change modifies focus behavior when a cell receives focus while focusedRowIndex is not set (< 0). There doesn’t appear to be a regression test that covers focusing a td in this state and asserting that keyboard navigation initializes its focused view correctly (and doesn’t throw / mis-handle subsequent focus updates). Please add a test (likely in packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.tests.js or keyboardNavigation.keyboardController.tests.js) that triggers focusin on a data cell with focusedRowIndex: -1/undefined and validates the expected focus state.

Copilot uses AI. Check for mistakes.
}
Expand Down
Loading