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

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 921
    • 212
  • Source
  • Commits
  • Network (212)
  • Graphs
  • Tree: c2c09e8

click here to add a description

click here to add a homepage

  • Switch Branches (8)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
    • widget-super
  • Switch Tags (21)
    • 1.9m2
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 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…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Autocomplete: Clear selectedItem property whenever the user types something. Also updated combobox to clear the select element when clearing the text element. Fixes #5453 - Autocomplete: combobox demo doesn't remove invalid values.
scottgonzalez (author)
Tue Jul 20 10:24:53 -0700 2010
commit  c2c09e89538ce071efba
tree    7502e74e542c0932a191
parent  e4273ff6212040bd7211
M demos/autocomplete/combobox.html 1 •
M ui/jquery.ui.autocomplete.js 1 •
Txt demos/autocomplete/combobox.html
  • View file @ c2c09e8
... ...
@@ -43,6 +43,7 @@
43 43
               if (!ui.item) {
44 44
                 // remove invalid value, as it didn't match anything
45 45
                 $(this).val("");
  46
+                select.val("");
46 47
                 return false;
47 48
               }
48 49
               select.val(ui.item.id);
Txt ui/jquery.ui.autocomplete.js
  • View file @ c2c09e8
... ...
@@ -79,6 +79,7 @@ $.widget( "ui.autocomplete", {
79 79
           self.searching = setTimeout(function() {
80 80
             // only search if the value has changed
81 81
             if ( self.term != self.element.val() ) {
  82
+              self.selectedItem = null;
82 83
               self.search( null, event );
83 84
             }
84 85
           }, self.options.delay );

0 notes on commit c2c09e8

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
  • 中文