File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -326,10 +326,8 @@ $.widget( "ui.autocomplete", {
326326
327327 _suggest : function ( items ) {
328328 var ul = this . menu . element
329- . empty ( )
330- . zIndex ( this . element . zIndex ( ) + 1 ) ,
331- menuWidth ,
332- textWidth ;
329+ . empty ( )
330+ . zIndex ( this . element . zIndex ( ) + 1 ) ;
333331 this . _renderMenu ( ul , items ) ;
334332 // TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate
335333 this . menu . deactivate ( ) ;
@@ -338,9 +336,15 @@ $.widget( "ui.autocomplete", {
338336 of : this . element
339337 } , this . options . position ) ) ;
340338
341- menuWidth = ul . width ( "" ) . outerWidth ( ) ;
342- textWidth = this . element . outerWidth ( ) ;
343- ul . outerWidth ( Math . max ( menuWidth , textWidth ) ) ;
339+ this . _resizeMenu ( ) ;
340+ } ,
341+
342+ _resizeMenu : function ( ) {
343+ var ul = this . menu . element ;
344+ ul . outerWidth ( Math . max (
345+ ul . width ( "" ) . outerWidth ( ) ,
346+ this . element . outerWidth ( )
347+ ) ) ;
344348 } ,
345349
346350 _renderMenu : function ( ul , items ) {
You can’t perform that action at this time.
0 commit comments