Skip to content

Commit 745a7a7

Browse files
committed
fix(IgxCell): should not make cross grid cell selection on drag #5714
1 parent 0a454f6 commit 745a7a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/igniteui-angular/src/lib/grids/cell.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
755755
* @internal
756756
*/
757757
pointerenter = (event: PointerEvent) => {
758-
if (this.grid.navigation.activeNode.gridID && this.grid.navigation.activeNode.gridID !== this.gridID) {
758+
if (!this.grid.navigation.activeNode.gridID || this.grid.navigation.activeNode.gridID !== this.gridID) {
759759
return;
760760
}
761761
const dragMode = this.selectionService.pointerEnter(this.selectionNode, event);
@@ -769,7 +769,8 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
769769
* @internal
770770
*/
771771
pointerup = (event: PointerEvent) => {
772-
if (!isLeftClick(event)) { return; }
772+
if (!isLeftClick(event) || !this.grid.navigation.activeNode.gridID ||
773+
this.grid.navigation.activeNode.gridID !== this.gridID) { return; }
773774
if (this.selectionService.pointerUp(this.selectionNode, this.grid.onRangeSelection)) {
774775
this.grid.cdr.detectChanges();
775776
}

0 commit comments

Comments
 (0)