Skip to content

Commit 693a735

Browse files
authored
Merge branch '20.0.x' into bpachilova/column-headers-a11y-15962
2 parents 2c9a5b3 + 7e40671 commit 693a735

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6356,6 +6356,9 @@ export abstract class IgxGridBaseDirective implements GridType,
63566356
// TODO: do not remove this, as it is used in rowEditTemplate, but mark is as internal and hidden
63576357
/* blazorCSSuppress */
63586358
public endEdit(commit = true, event?: Event): boolean {
6359+
if (!this.crudService.cellInEditMode && !this.crudService.rowInEditMode) {
6360+
return;
6361+
}
63596362
const document = this.nativeElement?.getRootNode() as Document | ShadowRoot;
63606363
const focusWithin = this.nativeElement?.contains(document.activeElement);
63616364

projects/igniteui-angular/src/lib/grids/grid/grid-cell-selection.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ describe('IgxGrid - Cell selection #grid', () => {
8484

8585
UIInteractions.simulatePointerOverElementEvent('pointerup', endCell.nativeElement);
8686
detect();
87+
// Invoke endEdit() to make sure if no editing is going on,
88+
// the cell activation shouldn't be lost (https://infragistics.visualstudio.com/Indigo_Platform/_workitems/edit/37933)
89+
grid.endEdit(true, null);
90+
fix.detectChanges();
8791

8892
expect(startCell.active).toBe(true);
8993
GridSelectionFunctions.verifyCellsRegionSelected(grid, 2, 3, 1, 0);

0 commit comments

Comments
 (0)