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", {
225225 var item = ui . item . data ( "ui-autocomplete-item" ) || ui . item . data ( "item.autocomplete" ) ;
226226 if ( false !== this . _trigger ( "focus" , event , { item : item } ) ) {
227227 // 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 ) ) {
229229 this . _value ( item . value ) ;
230230 }
231231 } else {
@@ -468,7 +468,7 @@ $.widget( "ui.autocomplete", {
468468 } , this . options . position ) ) ;
469469
470470 if ( this . options . autoFocus ) {
471- this . menu . next ( new $ . Event ( "mouseover" ) ) ;
471+ this . menu . next ( ) ;
472472 }
473473 } ,
474474
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ $.widget( "ui.menu", {
340340 // highlight active parent menu item, if any
341341 this . active . parent ( ) . closest ( ".ui-menu-item" ) . children ( "a:first" ) . addClass ( "ui-state-active" ) ;
342342
343- if ( event . type === "keydown" ) {
343+ if ( event && event . type === "keydown" ) {
344344 this . _close ( ) ;
345345 } else {
346346 this . timer = this . _delay ( function ( ) {
You can’t perform that action at this time.
0 commit comments