Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An in-place row update can remove the focused row’s tabindex without restoring it, leaving TreeList row-focus mode with no target for instance.focus(); the fix also needs a regression test.
1 open issue
What changed in this PR
This PR addresses focused-cell DOM focus loss during repaintChangesOnly updates in the shared DataGrid/TreeList focus controller.
Changes:
- Restricts focused-row cleanup to updates where another row still has the focused highlight.
- Reuses focused-row lookup logic for detection and cleanup.
- Adds a TreeList regression test verifying that expansion preserves the focused cell’s
tabindexand DOM focus.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/grids/tree_list/__tests__/focus_navigation.integration.test.ts | Tests cell-focus preservation during partial updates caused by row expansion. |
| packages/devextreme/js/__internal/grids/grid_core/focus/focus.ts | Adds stale-highlight detection to guard focused-row cleanup. |
Review effort: Balanced
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The case-sensitive tabindex lookup ignores the configured tabIndex when restoring row focus after partial updates, potentially returning rows to sequential keyboard navigation unexpectedly.
1 open issue
1 resolved since last review
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Fixed the focused cell losing focus when the focused row is updated in place with
repaintChangesOnly, e.g. TreeListexpandRowHow
The stale focused row cleanup now runs only when another row still has the focused row highlight