javascript - Filter table + virtual keyboard -


i have page jquery table filter , works fine regular keyboard not virtual keyboard.

check jsfiddle see mean, below code filter function.

https://jsfiddle.net/e3r76kdc/5/

$("#search").keyup(function(){     _this = this;     // show matching tr, hide rest of them     $.each($("#table tbody").find("tr"), function() {         console.log($(this).text());         if($(this).text().tolowercase().indexof($(_this).val().tolowercase()) == -1)            $(this).hide();         else              $(this).show();                     }); }); 

if type numbers on regular keyboard filters table if use virtual keyboard numbers appears filter doesn't work.

i bet it's simple i'm having trouble solving it.

thanks!

the issue virtual keyboard not trigger keyup event. checked source , trigger focus on input.

therefore can do:

$("#search").on('keyup focus', function() { ...

https://jsfiddle.net/e3r76kdc/6/


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -