File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ $.widget( "ui.autocomplete", {
225
225
var item = ui . item . data ( "ui-autocomplete-item" ) || ui . item . data ( "item.autocomplete" ) ;
226
226
if ( false !== this . _trigger ( "focus" , event , { item : item } ) ) {
227
227
// use value to match what will end up in the input, if it was a key event
228
- if ( / ^ k e y / . test ( event . originalEvent . type ) ) {
228
+ if ( event . originalEvent && / ^ k e y / . test ( event . originalEvent . type ) ) {
229
229
this . _value ( item . value ) ;
230
230
}
231
231
} else {
@@ -468,7 +468,7 @@ $.widget( "ui.autocomplete", {
468
468
} , this . options . position ) ) ;
469
469
470
470
if ( this . options . autoFocus ) {
471
- this . menu . next ( new $ . Event ( "mouseover" ) ) ;
471
+ this . menu . next ( ) ;
472
472
}
473
473
} ,
474
474
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ $.widget( "ui.menu", {
340
340
// highlight active parent menu item, if any
341
341
this . active . parent ( ) . closest ( ".ui-menu-item" ) . children ( "a:first" ) . addClass ( "ui-state-active" ) ;
342
342
343
- if ( event . type === "keydown" ) {
343
+ if ( event && event . type === "keydown" ) {
344
344
this . _close ( ) ;
345
345
} else {
346
346
this . timer = this . _delay ( function ( ) {
You can’t perform that action at this time.
0 commit comments