Skip to main content

jQ autocomplete issue in androdi app



I struggle with the autopcomplete Plugin for jQuery.







<input type="text" id="name" />

<input type="password" id=""pass" />

//...

$('#name').autocomplete({source: userName});







It works all fine but when I've selected a user name I get a text focus an both the name and the password input field. As soon as I type in a char it appears in both but just in the next moment the courser jumps in the name field and continues writing in there.





I tried to disable and/or unfocus the password field using jQuery's focus/focusout events as well as autcomplete's autocompleteclose events but none of these worked.





My target is a phinegap honegap 1.2.0. app, jQuery 1.18.16 and jqm 1.0 for 2.0+ android.





Edit


I forget the most important observation. This behaviour only occurs when I select a suggestion which is displayed over the password field. So my assumption is the click/tap event will be fired for both events. autocomplete's list and the field. So somewhat it's "transparent" for android.


Comments

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...