Ion-searchbar type=number, first keyboard coming up is alphabetic keyboard using focuser directive

So when I toggle to search bar by clicking on search icon for first time search bar get focus but alphabetic keyboard comes up, I want number keyboard to come up. If I remove; from directive code, then for first time no keyboard comes up. I don’t have this problem with successive clicks. Can anybody help me in this?


<ion-searchbar class="searchBarPadding" focuserSingle 
(change)="toggleSearchBar()" [(ngModel)]="input" type="number"
  (ionBlur)="toggleSearchBar()"> </ion-searchbar>

Focus Directive I am using

import { Directive, Renderer, ElementRef } from '@angular/core';
import { Keyboard } from '@ionic-native/keyboard';

    selector: '[focuser]' // Attribute selector
export class FocuserDirective {
    constructor(private renderer: Renderer,
                private elementRef: ElementRef,
                private keyboard:Keyboard) {
    ngAfterViewInit() {
        const element = this.elementRef.nativeElement.querySelector('input');
        setTimeout(() => {
            this.renderer.invokeElementMethod(element, 'focus', []);
        }, 0);

i was hoping someone will reply :confused:

anyone?? :expressionless: