From b84441caff6d6d17db1034dc31cfde4e9eec005b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20FINDIKLI?= Date: Wed, 17 Feb 2021 15:29:07 +0300 Subject: [PATCH] Refactor #9718 --- src/app/components/inputmask/inputmask.ts | 8 ++++---- src/app/showcase/components/inputmask/inputmaskdemo.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/components/inputmask/inputmask.ts b/src/app/components/inputmask/inputmask.ts index 5528efd6a19..c65cd644c8a 100755 --- a/src/app/components/inputmask/inputmask.ts +++ b/src/app/components/inputmask/inputmask.ts @@ -41,7 +41,7 @@ export const INPUTMASK_VALUE_ACCESSOR: any = { selector: 'p-inputMask', template: ``, host: { '[class.p-inputwrapper-filled]': 'filled', @@ -105,7 +105,7 @@ export class InputMask implements OnInit,OnDestroy,ControlValueAccessor { @Output() onInput: EventEmitter = new EventEmitter(); - @Output() onKeyDown: EventEmitter = new EventEmitter(); + @Output() onKeydown: EventEmitter = new EventEmitter(); value: any; @@ -395,7 +395,7 @@ export class InputMask implements OnInit,OnDestroy,ControlValueAccessor { } } - onKeyDown(e) { + onInputKeydown(e) { if (this.readonly) { return; } @@ -407,7 +407,7 @@ export class InputMask implements OnInit,OnDestroy,ControlValueAccessor { let iPhone = /iphone/i.test(DomHandler.getUserAgent()); this.oldVal = this.inputViewChild.nativeElement.value; - this.onKeyDown.emit(e); + this.onKeydown.emit(e); //backspace, delete, and escape get special treatment if (k === 8 || k === 46 || (iPhone && k === 127)) { diff --git a/src/app/showcase/components/inputmask/inputmaskdemo.html b/src/app/showcase/components/inputmask/inputmaskdemo.html index 6a4bff41c9f..f4a7b410b60 100755 --- a/src/app/showcase/components/inputmask/inputmaskdemo.html +++ b/src/app/showcase/components/inputmask/inputmaskdemo.html @@ -267,7 +267,7 @@
Events
Callback to invoke on when the input field value is altered. - onKeyDown + onKeydown event: KeyboardEvent Callback to invoke on when the input receives a keydown event.