autocomplete: lowercase searches clientside.
Lowercase searches clientside before sending them to the server. This is to improve cache hit rates when users accidentally type in uppercase, especially on mobile where the first letter often gets capitalized.
This commit is contained in:
@@ -97,7 +97,7 @@ Autocomplete.current_term = function($input) {
|
||||
let query = $input.get(0).value;
|
||||
let caret = $input.get(0).selectionStart;
|
||||
let regexp = new RegExp(`^[-~(]*(${Autocomplete.tag_prefixes().join("|")})?`);
|
||||
let match = query.substring(0, caret).match(/\S*$/)[0].replace(regexp, "");
|
||||
let match = query.substring(0, caret).match(/\S*$/)[0].replace(regexp, "").toLowerCase();
|
||||
return match;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user