Skip to content

Commit

Permalink
Fix keyboard navigation with row details
Browse files Browse the repository at this point in the history
  • Loading branch information
platosha committed Aug 25, 2017
1 parent c659771 commit c3499fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/keyboard-navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@
});

function findRowDetailsCell(scope) {
return scope.querySelector('.vaadin-grid-details-cell');
return scope.querySelector('[part~="details-cell"]');
}

it('should not navigate to row details with right arrow', function() {
Expand Down
4 changes: 2 additions & 2 deletions vaadin-grid-keyboard-navigation-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@

const activeCell = e.composedPath()[0];
const columnIndex = indexOfChildElement(activeCell);
const isRowDetails = activeCell.matches('.vaadin-grid-details-cell');
const isRowDetails = activeCell.matches('[part~="details-cell"]');

const activeRow = activeCell.parentNode;
// Body rows have index property, otherwise DOM child index of the row is used
Expand Down Expand Up @@ -240,7 +240,7 @@
// Here we go!
const dstCell = dstIsRowDetails ?
Array.from(dstRow.children)
.filter(el => el.matches('.vaadin-grid-details-cell'))[0] :
.filter(el => el.matches('[part~="details-cell"]'))[0] :
dstRow.children[dstColumnIndex];
this._focusCell(dstCell, activeRowGroup);
}
Expand Down

0 comments on commit c3499fb

Please sign in to comment.