Skip to content

Commit

Permalink
fix(filtering): prevent improper event firing in IE for JP #3577
Browse files Browse the repository at this point in the history
  • Loading branch information
SAndreeva committed Jan 14, 2019
1 parent fe95cdb commit 9f8a62d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
[type]="type"
[readonly]="isUnaryCondition"
(click)="onInputClick()"
(compositionstart)="onCompositionStart()"
(compositionend)="onCompositionEnd()"
(keydown)="onInputKeyDown($event)"
(keyup)="onInputKeyUp($event)"/>
<igx-suffix *ngIf="value || value === 0" (keydown)="onClearKeyDown($event)" (click)="clearInput()" tabindex="0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
private chipAreaScrollOffset = 0;
private _column = null;
private isKeyPressed = false;
private isComposing = false;

public showArrows: boolean;
public expression: IFilteringExpression;
Expand Down Expand Up @@ -241,6 +242,10 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
}

if (event.key === KEYS.ENTER) {
if (this.isComposing) {
return;
}

this.chipsArea.chipsList.filter(chip => chip.selected = false);

let indexToDeselect = -1;
Expand Down Expand Up @@ -286,6 +291,20 @@ export class IgxGridFilteringRowComponent implements AfterViewInit {
}
}

/**
* Event handler for compositionstart on the input.
*/
public onCompositionStart() {
this.isComposing = true;
}

/**
* Event handler for compositionend on the input.
*/
public onCompositionEnd() {
this.isComposing = false;
}

/**
* Event handler for input click event.
*/
Expand Down

0 comments on commit 9f8a62d

Please sign in to comment.