1
0
Fork 0

fixed a js bug

This commit is contained in:
Heiko Kernbach 2014-10-17 12:14:14 +02:00
parent 79852a79d0
commit 0d4b2c5af5
1 changed files with 8 additions and 2 deletions

View File

@ -46,7 +46,13 @@
$('#collectionsToggle').addClass('activated'); $('#collectionsToggle').addClass('activated');
} }
var length = searchOptions.searchPhrase.length; var length;
try {
length = searchOptions.searchPhrase.length;
}
catch (ignore) {
}
$('#searchInput').val(searchOptions.searchPhrase); $('#searchInput').val(searchOptions.searchPhrase);
$('#searchInput').focus(); $('#searchInput').focus();
$('#searchInput')[0].setSelectionRange(length, length); $('#searchInput')[0].setSelectionRange(length, length);