From 0be1e38d14348305ff953d4477b010c7cca42f7c Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Thu, 8 Nov 2012 15:43:36 +0530 Subject: [PATCH] Fix issue #24 - Search results replaced with full list when scrolling Change-Id: Iba3a798c9b4980943aded1ed145081fecc0367e3 --- src/jquery.uls.core.js | 3 ++- src/jquery.uls.lcd.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jquery.uls.core.js b/src/jquery.uls.core.js index 368ce48..17d9797 100644 --- a/src/jquery.uls.core.js +++ b/src/jquery.uls.core.js @@ -223,7 +223,8 @@ languages: that.languages, quickList: that.options.quickList, clickhandler: $.proxy( that.onSelect, that ), - lazyload: that.options.lazyload + lazyload: that.options.lazyload, + source: that.$languageFilter } ).data( "lcd" ); that.$languageFilter.languagefilter( { diff --git a/src/jquery.uls.lcd.js b/src/jquery.uls.lcd.js index 1d0dbc2..c0f1f06 100644 --- a/src/jquery.uls.lcd.js +++ b/src/jquery.uls.lcd.js @@ -262,7 +262,7 @@ var $ulsLanguageList = $( this ), scrollTop = $ulsLanguageList.position().top, scrollBottom = $ulsLanguageList.height(); - if ( lcd.options.lazyload ) { + if ( lcd.options.lazyload && lcd.options.source.val() === '' ) { if ( this.offsetHeight + this.scrollTop >= this.scrollHeight / 2 ) { lcd.$element.trigger( 'scrollend' ); }