Skip to content

Commit 26e6f2b

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

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
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
@@ -2992,8 +2992,9 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
29922992
((event.target === this.tbody.nativeElement && this.navigation.activeNode.row >= 0 &&
29932993
this.navigation.activeNode.row < this.dataView.length)
29942994
|| (event.target === this.theadRow.nativeElement && this.navigation.activeNode.row === -1)
2995-
|| (event.target === this.tfoot.nativeElement && this.navigation.activeNode.row === this.dataView.length)) &&
2996-
!(this.rowEditable && this.crudService.rowEditingBlocked && this.rowInEditMode)) {
2995+
|| (event.target === this.tfoot.nativeElement.children[0] &&
2996+
this.navigation.activeNode.row === this.dataView.length)) &&
2997+
!(this.rowEditable && this.crudService.rowEditingBlocked && this.crudService.rowInEditMode)) {
29972998
this.navigation.lastActiveNode = this.navigation.activeNode;
29982999
this.navigation.activeNode = {} as IActiveNode;
29993000
this.notifyChanges();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ export class IgxGridNavigationService {
336336
const next = shift ? this.grid.getPreviousCell(this.activeNode.row, this.activeNode.column, col => col.editable) :
337337
this.grid.getNextCell(this.activeNode.row, this.activeNode.column, col => col.editable);
338338
if (!this.grid.rowInEditMode && this.isActiveNode(next.rowIndex, next.visibleColumnIndex)) {
339-
this.grid.endEdit(true);
339+
this.grid.endEdit(true, event);
340+
this.grid.tbody.nativeElement.focus();
340341
return;
341342
}
342343
event.preventDefault();

0 commit comments

Comments
 (0)