From 860e31a333ef075fe49a3e785fa19122600e895e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 29 Oct 2015 16:30:56 +0100 Subject: [PATCH] dont trigger the scroll event of every single item we filter in the file list --- apps/files/js/filelist.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index c84d6c3c47..b6e1f791ed 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2117,15 +2117,16 @@ this.hideIrrelevantUIWhenNoFilesMatch(); } var that = this; + filter = filter.toLowerCase(); this.$fileList.find('tr').each(function(i,e) { var $e = $(e); - if ($e.data('file').toString().toLowerCase().indexOf(filter.toLowerCase()) === -1) { + if ($e.data('file').toString().toLowerCase().indexOf(filter) === -1) { $e.addClass('hidden'); - that.$container.trigger('scroll'); } else { $e.removeClass('hidden'); } }); + that.$container.trigger('scroll'); }, hideIrrelevantUIWhenNoFilesMatch:function() { if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {