Skip to content

Commit 1b44129

Browse files
Merge branch '10.2.x' into mkirova/fix-8398
2 parents 40c408b + 889b424 commit 1b44129

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
795795
const dragMode = this.selectionService.pointerEnter(this.selectionNode, event);
796796
if (dragMode) {
797797
this.grid.cdr.detectChanges();
798+
if (isIE()) { this.grid.tbody.nativeElement.focus({ preventScroll: true }); }
798799
}
799800
}
800801

@@ -808,6 +809,7 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
808809
this.grid.navigation.activeNode.gridID !== this.gridID))) { return; }
809810
if (this.selectionService.pointerUp(this.selectionNode, this.grid.onRangeSelection)) {
810811
this.grid.cdr.detectChanges();
812+
if (isIE()) { this.grid.tbody.nativeElement.focus({ preventScroll: true }); }
811813
}
812814
}
813815

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2987,6 +2987,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
29872987
_setupListeners() {
29882988
const destructor = takeUntil<any>(this.destroy$);
29892989
fromEvent(this.nativeElement, 'focusout').pipe(filter(() => !!this.navigation.activeNode), destructor).subscribe((event) => {
2990+
if (this.selectionService.dragMode && isIE()) { return; }
29902991
if (!this.crudService.cell &&
29912992
!!this.navigation.activeNode &&
29922993
((event.target === this.tbody.nativeElement && this.navigation.activeNode.row >= 0 &&
@@ -5905,21 +5906,12 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
59055906
}
59065907
}
59075908

5908-
/**
5909-
* @hidden @internal
5910-
*/
5911-
copyHandlerIE() {
5912-
if (isIE()) {
5913-
this.copyHandler(null, true);
5914-
}
5915-
}
5916-
59175909
/**
59185910
* @hidden
59195911
* @internal
59205912
*/
5921-
public copyHandler(event, ie11 = false) {
5922-
if (!this.clipboardOptions.enabled || this.crudService.cellInEditMode) {
5913+
public copyHandler(event) {
5914+
if (!this.clipboardOptions.enabled || this.crudService.cellInEditMode || (!isIE() && event.type === 'keydown')) {
59235915
return;
59245916
}
59255917

@@ -5938,7 +5930,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
59385930
result = result.substring(result.indexOf('\n') + 1);
59395931
}
59405932

5941-
if (ie11) {
5933+
if (isIE()) {
59425934
(window as any).clipboardData.setData('Text', result);
59435935
return;
59445936
}

projects/igniteui-angular/src/lib/grids/grid/grid.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalScroll()' [style.width.px]="scrollSize"></div>
9999
</div>
100100

101-
<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
101+
<div igxGridBody (keydown.control.c)="copyHandler($event)" (copy)="copyHandler($event)" class="igx-grid__tbody">
102102
<div class="igx-grid__tbody-content" tabindex="0" [attr.aria-activedescendant]="activeDescendant" (keydown)="navigation.handleNavigation($event)" (focus)="navigation.focusTbody($event)"
103103
role="rowgroup" (onDragStop)="selectionService.dragMode = $event" (scroll)='preventContainerScroll($event)'
104104
(onDragScroll)="dragScroll($event)" [igxGridDragSelect]="selectionService.dragMode"

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalScroll()' [style.width.px]="scrollSize"></div>
8383
</div>
8484

85-
<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
85+
<div igxGridBody (keydown.control.c)="copyHandler($event)" (copy)="copyHandler($event)" class="igx-grid__tbody">
8686
<div class="igx-grid__tbody-content" tabindex="0" (focus)="navigation.focusTbody($event)" [attr.aria-activedescendant]="activeDescendant"
8787
(keydown)="navigation.handleNavigation($event)" (onDragStop)="selectionService.dragMode = $event"
8888
(onDragScroll)="dragScroll($event)" [igxGridDragSelect]="selectionService.dragMode" role="rowgroup"

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
id="right" class="igx-grid__scroll-on-drag-right"></span>
6565
</div>
6666

67-
<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
67+
<div igxGridBody (keydown.control.c)="copyHandler($event)" (copy)="copyHandler($event)" class="igx-grid__tbody">
6868
<div class="igx-grid__tbody-content" tabindex="0" (focus)="navigation.focusTbody($event)" [attr.aria-activedescendant]="activeDescendant" (keydown)="navigation.handleNavigation($event)" role="rowgroup" (onDragStop)="selectionService.dragMode = $event"
6969
(onDragScroll)="dragScroll($event)" [igxGridDragSelect]="selectionService.dragMode"
7070
[style.height.px]='totalHeight' [style.width.px]='calcWidth' #tbody (scroll)='preventContainerScroll($event)'>

0 commit comments

Comments
 (0)