Bootstrap typeahead bug with jquery 1.8
scrolling in the suggested items using up/down keys doesn't work.
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
<script>
alert(jQuery().jquery);
</script>
<input type="text" id="tagsInput"></input>
JavaScript
const suggestions = [{
value1: 'string1'
}, {
value1: 'string2'
}, {
value1: 'string3'
}, {
value1: 'string4'
}, {
value1: 'string5'
}]
var bloodhoundSuggestions = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value1'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
sufficient: 3,
local: suggestions,
remote: {
url: 'https://www.mockaroo.com/api/generate.json?key=9c13bbb0&schema=typeahead',
}
});
const $tagsInput = $('#tagsInput')
$tagsInput.typeahead({
hint: true,
highlight: true,
minLength: 1
}, {
name: 'suggestions',
displayKey: 'value1',
source: bloodhoundSuggestions
});