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", {
326
326
327
327
_suggest : function ( items ) {
328
328
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 ) ;
333
331
this . _renderMenu ( ul , items ) ;
334
332
// TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate
335
333
this . menu . deactivate ( ) ;
@@ -338,9 +336,15 @@ $.widget( "ui.autocomplete", {
338
336
of : this . element
339
337
} , this . options . position ) ) ;
340
338
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
+ ) ) ;
344
348
} ,
345
349
346
350
_renderMenu : function ( ul , items ) {
You can’t perform that action at this time.
0 commit comments