mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-23 04:28:30 -04:00
Trim the search string before using it to find matching titles
Firefox OS autocompletion adds a space after each word it autocompletes, so the title search was failing when using that feature (or simply if you type a space at the end of your search string)
This commit is contained in:
parent
8b752aed89
commit
a684fec345
@ -125,7 +125,7 @@ define(function(require) {
|
||||
*/
|
||||
function searchTitlesFromPrefix(prefix) {
|
||||
if (localArchive.titleFile) {
|
||||
localArchive.findTitlesWithPrefix(prefix, populateDropDownListOfTitles);
|
||||
localArchive.findTitlesWithPrefix(prefix.trim(), populateDropDownListOfTitles);
|
||||
} else {
|
||||
alert("Title file not set");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user