Commit 108ede5
Fix data grid selection with keyboard navigation
1) Ensure only one row is highlighted when using keyboard navigation
Currently keyboard navigation doesn't change activeElement, but sets 'selected' CSS class, which can results in one row highlighted due to the `:focus-within` rule and the other due to the `.selected` rule
2) Do not reset focus on keydown if the data grid is in the shadow root
Currently we check if `document.activeElement` is in the data grid's subtree, but `document.activeElement` might be the shadow host of the data grid.
Bug: 394287937
Change-Id: If779219871d1e076e0b3cbf937cf2dae577058f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6226108
Reviewed-by: Kim-Anh Tran <[email protected]>
Auto-Submit: Danil Somsikov <[email protected]>
Commit-Queue: Kim-Anh Tran <[email protected]>1 parent bafe6ca commit 108ede5
File tree
2 files changed
+3
-2
lines changed- front_end/ui/legacy/components/data_grid
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | | - | |
| 1234 | + | |
| 1235 | + | |
1235 | 1236 | | |
1236 | 1237 | | |
1237 | 1238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
0 commit comments