Skip to content

Commit ce454bf

Browse files
Merge branch '19.2.x' into mkirkova/feat-combo-toggle-button-19.2.x
2 parents 8b05931 + 5221b7c commit ce454bf

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
@@ -6316,6 +6316,9 @@ export abstract class IgxGridBaseDirective implements GridType,
63166316
// TODO: do not remove this, as it is used in rowEditTemplate, but mark is as internal and hidden
63176317
/* blazorCSSuppress */
63186318
public endEdit(commit = true, event?: Event): boolean {
6319+
if (!this.crudService.cellInEditMode && !this.crudService.rowInEditMode) {
6320+
return;
6321+
}
63196322
const document = this.nativeElement?.getRootNode() as Document | ShadowRoot;
63206323
const focusWithin = this.nativeElement?.contains(document.activeElement);
63216324

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)