mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Autocomplete: Handle IE firing focus events asynchronously. Fixes #6109 - Autocomplete Change event does not fire in IE.
This commit is contained in:
parent
a3da1045a1
commit
0ccc78698b
6
ui/jquery.ui.autocomplete.js
vendored
6
ui/jquery.ui.autocomplete.js
vendored
@ -160,6 +160,12 @@ $.widget( "ui.autocomplete", {
|
||||
if ( self.element[0] !== doc.activeElement ) {
|
||||
self.element.focus();
|
||||
self.previous = previous;
|
||||
// #6109 - IE triggers two focus events and the second
|
||||
// is asynchronous, so we need to reset the previous
|
||||
// term synchronously and asynchronously :-(
|
||||
setTimeout(function() {
|
||||
self.previous = previous;
|
||||
}, 1);
|
||||
}
|
||||
|
||||
if ( false !== self._trigger( "select", event, { item: item } ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user