Fixed WCF.Search.Base
authorAlexander Ebert <ebert@woltlab.com>
Mon, 12 Nov 2012 00:42:41 +0000 (01:42 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 12 Nov 2012 00:42:41 +0000 (01:42 +0100)
wcfsetup/install/files/js/WCF.js

index 10d1c428b8042fe9ee2b5342c6f8e20f92e9d1b2..c3bc2f63311e2f3333714a7ebe9157dc05e5a00d 100755 (executable)
@@ -4740,7 +4740,7 @@ WCF.Search.Base = Class.extend({
                        var $result = $listItem.data('label');
                        for (var $i = 0, $length = this._oldSearchString.length; $i < $length; $i++) {
                                var $part = this._oldSearchString[$i];
-                               if ($result.indexOf($part) === 0) {
+                               if ($result.toLowerCase().indexOf($part.toLowerCase()) === 0) {
                                        this._oldSearchString[$i] = $result;
                                        this._searchInput.attr('value', this._oldSearchString.join(', '));
                                        
@@ -4751,7 +4751,7 @@ WCF.Search.Base = Class.extend({
                                        }
                                        
                                        // set focus on input field again
-                                       var $position = this._searchInput.val().indexOf($result) + $result.length;
+                                       var $position = this._searchInput.val().toLowerCase().indexOf($result.toLowerCase()) + $result.length;
                                        this._searchInput.focus().setCaret($position);
                                        
                                        break;