Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix list item pruning while filtering

  • Loading branch information...
commit 98b6ea3fb484ae85e354dc24e205260372c0ac18 1 parent 16bd333
Marcus Lunzenauer authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 js/jquery.mobile.listview.filter.js
View
6 js/jquery.mobile.listview.filter.js
@@ -37,13 +37,11 @@ $( document ).delegate( ":jqmData(role='listview')", "listviewcreate", function(
lastval = $this.jqmData( "lastval" ) + "",
childItems = false,
itemtext = "",
- item, change;
+ item;
// Change val as lastval for next execution
$this.jqmData( "lastval" , val );
- change = val.substr( 0 , lastval.length - 1 ).replace( lastval , "" );
-
- if ( val.length < lastval.length || change.length != ( val.length - lastval.length ) ) {
+ if ( val.length < lastval.length || val.indexOf(lastval) !== 0 ) {
// Removed chars or pasted something totally different, check all items
listItems = list.children();
Please sign in to comment.
Something went wrong with that request. Please try again.