Number only directive works on pc but not in mobile

Hi guys, I have a directive that allows user input only integer numbers, it’s working fine on desktop chrome and firefox, but it’s not working on device (it accepts dot and comma, for example).
Can you help me? Here is the code.
By the way, I just tried the input types: tel, number and text, it works only on desktop.

Template:

<ion-item>
<ion-label floating color="secondary">Levantamento Atual</ion-label>
<ion-input type="tel" formControlName="avaliacao_atual" integerOnly></ion-input>
</ion-item>

Directive:

import { Directive, HostListener } from '@angular/core';
@Directive({
    selector: '[integerOnly]'
})
export class NumberOnlyDirective {
    @HostListener('keypress')
    onkeypress(e) {
        let event = e || window.event;
        console.log(event);
        if (event) {
            return this.isNumberKey(event);
        }
    }
    isNumberKey(event) {
        console.log(event);
        let charCode = event.which ? event.which : event.keyCode;
        if (charCode > 31 && (charCode < 48 || charCode > 57)) {
            return false;
        }
        return true;
    }
}