File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -508,12 +508,14 @@ $.widget("ui.selectmenu", {
508
508
this . list . appendTo ( 'body' ) ;
509
509
}
510
510
this . list . addClass ( self . widgetBaseClass + '-open' )
511
- . attr ( 'aria-hidden' , false )
512
- . find ( 'li:not(.' + self . widgetBaseClass + '-group):eq(' + this . _selectedIndex ( ) + ') a' ) [ 0 ] . focus ( ) ;
511
+ . attr ( 'aria-hidden' , false ) ;
512
+ // (Philipp C. Adrian) FIX IE: Refreshing position before focusing the element.
513
+ // Prevents IE from scrolling to the focused element before it is in position.
514
+ this . _refreshPosition ( ) ;
515
+ this . list . find ( 'li:not(.' + self . widgetBaseClass + '-group):eq(' + this . _selectedIndex ( ) + ') a' ) [ 0 ] . focus ( ) ;
513
516
if ( this . options . style == "dropdown" ) {
514
517
this . newelement . removeClass ( 'ui-corner-all' ) . addClass ( 'ui-corner-top' ) ;
515
518
}
516
- this . _refreshPosition ( ) ;
517
519
this . _trigger ( "open" , event , this . _uiHash ( ) ) ;
518
520
}
519
521
} ,
You can’t perform that action at this time.
0 commit comments