second attempt to fix #2416

This commit is contained in:
Hans-Peter Buniat 2011-09-19 07:12:36 +02:00
parent afe6630425
commit df68b0188c

View file

@ -40,16 +40,11 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
lastval = $this.jqmData( "lastval" ) + "",
childItems = false,
itemtext = "",
item, change,
regex = "";
try {
regex = new RegExp( "^" + lastval );
} catch (e) {}
item, change;
// Change val as lastval for next execution
$this.jqmData( "lastval" , val );
change = val.replace( regex , "" );
change = val.substr( 0 , lastval.length + 1 ).replace( lastval , "" );
if ( val.length < lastval.length || change.length != ( val.length - lastval.length ) ) {