Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6349,6 +6349,9 @@ export abstract class IgxGridBaseDirective implements GridType,
// TODO: do not remove this, as it is used in rowEditTemplate, but mark is as internal and hidden
/* blazorCSSuppress */
public endEdit(commit = true, event?: Event): boolean {
if (!this.crudService.cellInEditMode && !this.crudService.rowInEditMode) {
return;
}
const document = this.nativeElement?.getRootNode() as Document | ShadowRoot;
const focusWithin = this.nativeElement?.contains(document.activeElement);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ describe('IgxGrid - Cell selection #grid', () => {

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

expect(startCell.active).toBe(true);
GridSelectionFunctions.verifyCellsRegionSelected(grid, 2, 3, 1, 0);
Expand Down
Loading