Changeset - a1eb43a1e83e
[Not reviewed]
default
0 1 0
Mads Kiilerich - 10 years ago 2015-11-16 19:33:37
madski@unity3d.com
select2: be case insensitive when putting prefix matches first in result lists

The filtering is case insensitive.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/base.js
Show inline comments
 
@@ -1860,8 +1860,8 @@ var branchSort = function(results, conta
 
            }
 

	
 
            // Put prefix matches before matches in the line
 
            var aPos = a.text.indexOf(query.term),
 
                bPos = b.text.indexOf(query.term);
 
            var aPos = a.text.toLowerCase().indexOf(query.term.toLowerCase()),
 
                bPos = b.text.toLowerCase().indexOf(query.term.toLowerCase());
 
            if (aPos === 0 && bPos !== 0) {
 
                return -1;
 
            }
0 comments (0 inline, 0 general)