From 49a44f77e42c93a1395d55a0cff0d97d50c615b0 Mon Sep 17 00:00:00 2001 From: SAndreeva Date: Mon, 14 Jan 2019 16:53:06 +0200 Subject: [PATCH 1/5] fix(filtering): chip not added while typing in JP on Edge #3599 --- .../lib/grids/filtering/grid-filtering-row.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts index 44cc57b6902..e0c583f28fb 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts @@ -24,7 +24,7 @@ import { IChipSelectEventArgs, IBaseChipEventArgs, IgxChipsAreaComponent, IgxChi import { ExpressionUI } from './grid-filtering.service'; import { IgxDropDownItemComponent } from '../../drop-down/drop-down-item.component'; import { IgxFilteringService } from './grid-filtering.service'; -import { KEYS } from '../../core/utils'; +import { KEYS, isIE } from '../../core/utils'; import { AbsoluteScrollStrategy } from '../../services/overlay/scroll'; /** @@ -286,9 +286,12 @@ export class IgxGridFilteringRowComponent implements AfterViewInit { public onInput(eventArgs) { // The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason, // when you have a japanese character as a placeholder, on init the value here is empty string . - if (this.isKeyPressed) { + if (isIE() && this.isKeyPressed) { this.value = eventArgs.target.value; + return; } + + this.value = eventArgs.target.value; } /** From e4d489245408d42006e4ba9b4baa4d7161486a40 Mon Sep 17 00:00:00 2001 From: SAndreeva Date: Mon, 14 Jan 2019 16:54:52 +0200 Subject: [PATCH 2/5] fix(filtering): chip not added while typing in JP on Edge #3599 --- .../lib/grids/filtering/grid-filtering-row.component.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts index e0c583f28fb..44cc57b6902 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts @@ -24,7 +24,7 @@ import { IChipSelectEventArgs, IBaseChipEventArgs, IgxChipsAreaComponent, IgxChi import { ExpressionUI } from './grid-filtering.service'; import { IgxDropDownItemComponent } from '../../drop-down/drop-down-item.component'; import { IgxFilteringService } from './grid-filtering.service'; -import { KEYS, isIE } from '../../core/utils'; +import { KEYS } from '../../core/utils'; import { AbsoluteScrollStrategy } from '../../services/overlay/scroll'; /** @@ -286,12 +286,9 @@ export class IgxGridFilteringRowComponent implements AfterViewInit { public onInput(eventArgs) { // The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason, // when you have a japanese character as a placeholder, on init the value here is empty string . - if (isIE() && this.isKeyPressed) { + if (this.isKeyPressed) { this.value = eventArgs.target.value; - return; } - - this.value = eventArgs.target.value; } /** From 71ddae074fc0ecd8f41e36c5b278eb47b69eeada Mon Sep 17 00:00:00 2001 From: SAndreeva Date: Tue, 15 Jan 2019 13:07:44 +0200 Subject: [PATCH 3/5] fix(filtering): chip creation while typing in JP on Edge #3599 --- .../lib/grids/filtering/grid-filtering-row.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts index 50aca440bc8..a610d79b3f5 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts @@ -24,7 +24,7 @@ import { IChipSelectEventArgs, IBaseChipEventArgs, IgxChipsAreaComponent, IgxChi import { ExpressionUI } from './grid-filtering.service'; import { IgxDropDownItemComponent } from '../../drop-down/drop-down-item.component'; import { IgxFilteringService } from './grid-filtering.service'; -import { KEYS } from '../../core/utils'; +import { KEYS, isIE } from '../../core/utils'; import { AbsoluteScrollStrategy } from '../../services/overlay/scroll'; /** @@ -286,9 +286,12 @@ export class IgxGridFilteringRowComponent implements AfterViewInit { public onInput(eventArgs) { // The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason, // when you have a japanese character as a placeholder, on init the value here is empty string . - if (this.isKeyPressed) { + if (isIE() && this.isKeyPressed) { this.value = eventArgs.target.value; + return; } + + this.value = eventArgs.target.value; } /** From 1aefcb306fc739fdd99dbb057ebc66ec809e4cbf Mon Sep 17 00:00:00 2001 From: SAndreeva Date: Tue, 15 Jan 2019 18:12:48 +0200 Subject: [PATCH 4/5] refactor(*): rewrite the senseless logic #3599 --- .../lib/grids/filtering/grid-filtering-row.component.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts index a610d79b3f5..6d965ce64ad 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts @@ -24,7 +24,7 @@ import { IChipSelectEventArgs, IBaseChipEventArgs, IgxChipsAreaComponent, IgxChi import { ExpressionUI } from './grid-filtering.service'; import { IgxDropDownItemComponent } from '../../drop-down/drop-down-item.component'; import { IgxFilteringService } from './grid-filtering.service'; -import { KEYS, isIE } from '../../core/utils'; +import { KEYS, isEdge } from '../../core/utils'; import { AbsoluteScrollStrategy } from '../../services/overlay/scroll'; /** @@ -286,12 +286,11 @@ export class IgxGridFilteringRowComponent implements AfterViewInit { public onInput(eventArgs) { // The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason, // when you have a japanese character as a placeholder, on init the value here is empty string . - if (isIE() && this.isKeyPressed) { + if (isEdge()) { + this.value = eventArgs.target.value; + } else if (this.isKeyPressed) { this.value = eventArgs.target.value; - return; } - - this.value = eventArgs.target.value; } /** From c375cf84ab4f17ecacbaa9f50b1e0509eed131a4 Mon Sep 17 00:00:00 2001 From: SAndreeva Date: Wed, 16 Jan 2019 15:28:29 +0200 Subject: [PATCH 5/5] refactor(*): combine clauses to avoid code duplication #3599 --- .../src/lib/grids/filtering/grid-filtering-row.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts index 6d965ce64ad..c529641e00a 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts @@ -286,9 +286,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit { public onInput(eventArgs) { // The 'iskeyPressed' flag is needed for a case in IE, because the input event is fired on focus and for some reason, // when you have a japanese character as a placeholder, on init the value here is empty string . - if (isEdge()) { - this.value = eventArgs.target.value; - } else if (this.isKeyPressed) { + if (isEdge() || this.isKeyPressed) { this.value = eventArgs.target.value; } }