Skip to content

Commit a507930

Browse files
committed
fix(kb-nav): clear active node when leaving summary section
Closes #9234
1 parent e483b21 commit a507930

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3272,8 +3272,9 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
32723272
((event.target === this.tbody.nativeElement && this.navigation.activeNode.row >= 0 &&
32733273
this.navigation.activeNode.row < this.dataView.length)
32743274
|| (event.target === this.theadRow.nativeElement && this.navigation.activeNode.row === -1)
3275-
|| (event.target === this.tfoot.nativeElement && this.navigation.activeNode.row === this.dataView.length)) &&
3276-
!(this.rowEditable && this.crudService.rowEditingBlocked && this.rowInEditMode)) {
3275+
|| (event.target === this.tfoot.nativeElement.children[0] &&
3276+
this.navigation.activeNode.row === this.dataView.length)) &&
3277+
!(this.rowEditable && this.crudService.rowEditingBlocked && this.crudService.rowInEditMode)) {
32773278
this.navigation.lastActiveNode = this.navigation.activeNode;
32783279
this.navigation.activeNode = {} as IActiveNode;
32793280
this.notifyChanges();

projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,9 @@ export class IgxGridNavigationService {
527527
protected handleEditing(shift: boolean, event: KeyboardEvent) {
528528
const next = shift ? this.grid.getPreviousCell(this.activeNode.row, this.activeNode.column, col => col.editable) :
529529
this.grid.getNextCell(this.activeNode.row, this.activeNode.column, col => col.editable);
530-
if (!this.grid.rowInEditMode && this.isActiveNode(next.rowIndex, next.visibleColumnIndex)) {
531-
this.grid.endEdit(true, event);
530+
if (!this.grid.crudService.rowInEditMode && this.isActiveNode(next.rowIndex, next.visibleColumnIndex)) {
531+
this.grid.crudService.endEdit(true, event);
532+
this.grid.tbody.nativeElement.focus();
532533
return;
533534
}
534535
event.preventDefault();

0 commit comments

Comments
 (0)