github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
    • 1,222
    • 303
  • Source
  • Commits
  • Network
  • Pull Requests (7)
  • Graphs
  • Tree: a0c8564

click here to add a description

click here to add a homepage

  • Switch Branches (9)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • spinner
    • tooltip
    • widget-super
  • Switch Tags (23)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.6
    • 1.8.5
    • 1.8.4
    • 1.8.3
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…
Downloads

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Autocomplete: Split menu resizing logic into its own method to create a more logical method to proxy for custom sizing.
scottgonzalez (author)
Thu Oct 21 19:15:13 -0700 2010
commit  a0c856467d7cb19442ac
tree    727a570997fd6b69706f
parent  6ba75aa698361bf8c87a

Showing 1 changed file with 11 additions and 7 deletions.

M ui/jquery.ui.autocomplete.js 18 ••••
Txt ui/jquery.ui.autocomplete.js
  • View file @ a0c8564
... ...
@@ -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 ) {

0 notes on commit a0c8564

Please log in to comment.
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • Русский
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Русский
  • Српски
  • Svenska
  • 中文

Keyboard Shortcuts

Site wide shortcuts

s
Focus site search
?
Bring up this help dialog

Commit list

j
Move selected down
k
Move selected up
t
Open tree
p
Open parent
c or o or enter
Open commit

Pull request list

j
Move selected down
k
Move selected up
o or enter
Open issue

Issues

j
Move selected down
k
Move selected up
x
Toggle select target
o or enter
Open issue
I
Mark selected as read
U
Mark selected as unread
e
Close selected
y
Remove selected from view
c
Create issue
l
Create label
i
Back to inbox
u
Back to issues
/
Focus issues search

Network Graph

← or h
Scroll left
→ or l
Scroll right
↑ or k
Scroll up
↓ or j
Scroll down
t
Toggle visibility of head labels
shift ← or shift h
Scroll all the way left
shift → or shift l
Scroll all the way right
shift ↑ or shift k
Scroll all the way up
shift ↓ or shift j
Scroll all the way down