Skip to content

Commit 1ffa20b

Browse files
authored
Merge pull request #9253 from IgniteUI/clear-active-node-summary-11.1.x
fix(kb-nav): clear active node when leaving summary section
2 parents fb6640b + 87feb27 commit 1ffa20b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
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
@@ -3275,8 +3275,9 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
32753275
((event.target === this.tbody.nativeElement && this.navigation.activeNode.row >= 0 &&
32763276
this.navigation.activeNode.row < this.dataView.length)
32773277
|| (event.target === this.theadRow.nativeElement && this.navigation.activeNode.row === -1)
3278-
|| (event.target === this.tfoot.nativeElement && this.navigation.activeNode.row === this.dataView.length)) &&
3279-
!(this.rowEditable && this.crudService.rowEditingBlocked && this.rowInEditMode)) {
3278+
|| (event.target === this.tfoot.nativeElement.children[0] &&
3279+
this.navigation.activeNode.row === this.dataView.length)) &&
3280+
!(this.rowEditable && this.crudService.rowEditingBlocked && this.crudService.rowInEditMode)) {
32803281
this.navigation.lastActiveNode = this.navigation.activeNode;
32813282
this.navigation.activeNode = {} as IActiveNode;
32823283
this.notifyChanges();

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ export class IgxGridNavigationService {
529529
this.grid.getNextCell(this.activeNode.row, this.activeNode.column, col => col.editable);
530530
if (!this.grid.rowInEditMode && this.isActiveNode(next.rowIndex, next.visibleColumnIndex)) {
531531
this.grid.endEdit(true, event);
532+
this.grid.tbody.nativeElement.focus();
532533
return;
533534
}
534535
event.preventDefault();

0 commit comments

Comments
 (0)