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 @@ -221,6 +221,16 @@ $.widget( "ui.autocomplete", {
221
221
this . cancelBlur = true ;
222
222
this . _delay ( function ( ) {
223
223
delete this . cancelBlur ;
224
+
225
+ // Support: IE 8 only
226
+ // Right clicking a menu item or selecting text from the menu items will
227
+ // result in focus moving out of the input. However, we've already received
228
+ // and ignored the blur event because of the cancelBlur flag set above. So
229
+ // we restore focus to ensure that the menu closes properly based on the user's
230
+ // next actions.
231
+ if ( this . element [ 0 ] !== $ . ui . safeActiveElement ( this . document [ 0 ] ) ) {
232
+ this . element . focus ( ) ;
233
+ }
224
234
} ) ;
225
235
226
236
// clicking on the scrollbar causes focus to shift to the body
You can’t perform that action at this time.
0 commit comments