Permalink
Browse files

second attempt to fix #2416

  • Loading branch information...
hpbuniat committed Sep 19, 2011
1 parent afe6630 commit df68b0188cfcaf1d339cd0972fb0e807ea9fc522
Showing with 2 additions and 7 deletions.
  1. +2 −7 js/jquery.mobile.listview.filter.js
@@ -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 ) ) {

0 comments on commit df68b01

Please sign in to comment.