Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery - Android - The 'Keyup' Event Does Not Work On Backspace In Chrome

I am wondering why the backspace/ delete button does not detect a keyup event in jQuery.

I find this odd as it is useful and should be supported. Are there any alternatives to this?

This is only happening in Android - Chrome.

like image 636
Paddy Avatar asked Feb 12 '23 14:02

Paddy


1 Answers

You can actually fix this by attaching an event listener to the input.

var inputBox = document.getElementById('inputId');

inputBox.addEventListener(‘input’, function() {
    exampleFunc();
}, false);

Cheers

like image 184
Paddy Avatar answered Feb 15 '23 04:02

Paddy