I am building a complex text area autocomplete similar to twitter which involves disabling the autocomplete after select and enabling autocomplete again when a user types a special character.
I found a bug with chrome and IE that doesn’t exist in firefox.
On Chrome after selecting an item via enter and disabling the autocomplete on the textarea the first keyboard input is ignored. For example, select the autocomplete option then hit space. The space is ignored. Hit it again and it works.
The first space is not ignored in firefox but it is in chrome.
Here is a simple example that I setup on http://jsfiddle.net/H4ayD/ to illustrate the issue.
Any ideas on how to fix this?
I found a simple workaround to fix the issue. Triggering a keypress event on the input area after selecting the item from the autocomplete fixes the issue.
You can see the fix work here:
http://jsfiddle.net/HKxua/