Arrow keys not working in firefox with given javascript

I have one textbox coded like below :

<input name="txttelephone" type="text" maxlength="16" id="txttelephone" class="InputTextBox" onkeypress="return NumbersOnly(event);" required />

And javascript function is like below :

function NumbersOnly(e) {
    var unicode = e.charCode ? e.charCode : e.keyCode;
    if (unicode != 8) {
        if (unicode < 48 || unicode > 57) {

            if (unicode == 9)
                return true;
            else
                return false;
        }
    }
}

Now When I run this in chrome arrow keys working proper but in firefox arrow key is not working. Not getting what is the issue.

Please help me with this.

Thanks,

Dipa


Click here view more answers http://ift.tt/1OesaRM