jQuery UI 1.8.9 and jQuery 1.5.0 on 64 bit Linux:
- $('#s').autocomplete({source : localArray});
- $('#s').change(function() {
- var v = $('#s').val();
- });
$('#s') is an input textfield. After typing in the textfield (for example 'a'), select an item (for example 'abc') from the autocomplete menu, the change function is executed and variable v becomes 'a'. It seems autocomplete triggers a change event for the textfield before changing its value. The correct behavior should be triggering the event after changing the textfield value.