Skip to content

Commit 38f4531

Browse files
authored
Merge pull request #9254 from IgniteUI/clear-active-node-summary-10.2.x
fix(kb-nav): clear active node when leaving summary section
2 parents cffc1d9 + 91ab1d0 commit 38f4531

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
@@ -2994,8 +2994,9 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
29942994
((event.target === this.tbody.nativeElement && this.navigation.activeNode.row >= 0 &&
29952995
this.navigation.activeNode.row < this.dataView.length)
29962996
|| (event.target === this.theadRow.nativeElement && this.navigation.activeNode.row === -1)
2997-
|| (event.target === this.tfoot.nativeElement && this.navigation.activeNode.row === this.dataView.length)) &&
2998-
!(this.rowEditable && this.crudService.rowEditingBlocked && this.rowInEditMode)) {
2997+
|| (event.target === this.tfoot.nativeElement.children[0] &&
2998+
this.navigation.activeNode.row === this.dataView.length)) &&
2999+
!(this.rowEditable && this.crudService.rowEditingBlocked && this.crudService.rowInEditMode)) {
29993000
this.navigation.lastActiveNode = this.navigation.activeNode;
30003001
this.navigation.activeNode = {} as IActiveNode;
30013002
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)