I was just playing around with jquery autocomplete. I've set the minimum length to 3.
if I typed in the letters "sci" it would then get all records that has the letters "sci" in the title. This part is **working** correctly as all records with the letters "sci" are returned and displayed.
But if say I continue typing (after a pause of course. at this point I typed "scisdfgdsfsd"), it still displays the previous choices. There are certainly no records with titles using the letters "scisdfgdsfsd" in it.
My strong suspicion is that the if data.length instruction in your source: option keeps the data visible because it calls a function and that function is still active with garbage input strings. I suspect AC hangs. I know that source: options that do not have that kind of branch to a function do not display any garbage strings from a user.
There are other ways to ensure the user selects from only displayed items. Here's a demo. You could add a show/hide message or an alert after the disable instruction if you want to say something to the user