Clearing content - suggestions not cleared
I think there is a bug in the plugin to do with removing content from the input box typeahead() is applied to.
Steps to replicate:
- Type something into text input, e.g. 'word'
- Use Jquery in browser console to clear the content, e.g.
$('#InputBox').val('') - Observe blank text input
- Click into text input (to give text input focus)
- Click out of text input (to remove focus)
- Observe content 'word' appearing in the text input.
I am applying a 'remove-content' button in the right-hand-side of the text input for users to remove content on-click. This button runs code: $('#InputBox').val('') but the bug I've identified means this isn't working as desired.
Interestingly, if you change the type of the input to 'search' and use the in-built remove-content-cross then it circumvents this bug. Unfortunately our inputs need to be type='text' on our site. Also, the in-built remove-content-crosses cannot be custom styled.
A fix for this would be great. Thanks :)
Yes, I've been able to fix it now. Thanks for your help!