File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,16 @@ $.widget( "ui.autocomplete", {
229229 this . cancelBlur = true ;
230230 this . _delay ( function ( ) {
231231 delete this . cancelBlur ;
232+
233+ // Support: IE 8 only
234+ // Right clicking a menu item or selecting text from the menu items will
235+ // result in focus moving out of the input. However, we've already received
236+ // and ignored the blur event because of the cancelBlur flag set above. So
237+ // we restore focus to ensure that the menu closes properly based on the user's
238+ // next actions.
239+ if ( this . element [ 0 ] !== $ . ui . safeActiveElement ( this . document [ 0 ] ) ) {
240+ this . element . focus ( ) ;
241+ }
232242 } ) ;
233243
234244 // clicking on the scrollbar causes focus to shift to the body
You can’t perform that action at this time.
0 commit comments