Autocomplete change event when this.previous is undefined

Autocomplete change event when this.previous is undefined

When I tab into an input text field that has data in it and that has an autocomplete handler attached to it, for some reason, the field does not receive focus, and so the autocomplete "this.previous" variable is not set. (This may be the real bug; the field does receive focus when clicked in.) In any event, when I then tab out of that field, autocomplete's blur handler calls its _change() function, which then compares "this.previous" to "this.element.val()." Because "this.previous" is undefined, that returns true, even though the field contents have not changed.

It looks like the simple solution would be to test whether "this.previous" is defined and for the _change() function to return false if it is not. In jQuery UI Autocomplete 1.9.2, this would mean changing line 459 from:

if ( this.previous !== this.element.val() ) {

to:

if ( typeof(this.previous) !== 'undefined'  && this.previous !== this.element.val() ) {

If it would help, I could try to track down why the input fields receive blur, but not focus events when tabbed into and out of.