]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: changed autoFocus default to true for 1.9. Fixed #7042 - Autocomplete...
authorRichard Worth <rdworth@gmail.com>
Tue, 15 Mar 2011 09:48:31 +0000 (05:48 -0400)
committerRichard Worth <rdworth@gmail.com>
Tue, 15 Mar 2011 09:48:31 +0000 (05:48 -0400)
tests/unit/autocomplete/autocomplete_core.js
tests/unit/autocomplete/autocomplete_defaults.js
tests/unit/autocomplete/autocomplete_events.js
ui/jquery.ui.autocomplete.js

index 2edb8876c6130927124b2e8d3e0f9f9536c7db38..19f52dc15389e3ec9416a371408d742d363db1a3 100644 (file)
@@ -60,6 +60,7 @@ test( "prevent form submit on enter when menu is active", function() {
 test( "allow form submit on enter when menu is not active", function() {
        var event;
        var ac = $( "#autocomplete" ).autocomplete({
+               autoFocus: false,
                source: [ "java", "javascript" ]
        }).val( "ja" ).autocomplete( "search" );
        
index dd5007089c630d95d218c4c991853059dde2736a..e2196ea9ea1edd422140e8a22b9d0c114fec345a 100644 (file)
@@ -4,7 +4,7 @@
 
 var autocomplete_defaults = {
        appendTo: "body",
-       autoFocus: false,
+       autoFocus: true,
        delay: 300,
        disabled: false,
        minLength: 1,
index 20fdb8471746d2db757994c3210720d2e647905e..aa0a17730cad58a4e367a38e5d71c41d2bd3b860 100644 (file)
@@ -14,6 +14,7 @@ var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "py
 test("all events", function() {
        expect(12);
        var ac = $("#autocomplete").autocomplete({
+               autoFocus: false,
                delay: 0,
                source: data,
                search: function(event) {
@@ -56,6 +57,7 @@ test("all events", function() {
 test("all events - contenteditable", function() {
        expect(12);
        var ac = $("#autocomplete-contenteditable").autocomplete({
+               autoFocus: false,
                delay: 0,
                source: data,
                search: function(event) {
index e6acd4b637fc93c2308e1e73582eb5b4ea63346b..a9e4b411929a4a2c16dc0013cab6908804489361 100644 (file)
@@ -22,7 +22,7 @@ $.widget( "ui.autocomplete", {
        defaultElement: "<input>",
        options: {
                appendTo: "body",
-               autoFocus: false,
+               autoFocus: true,
                delay: 300,
                minLength: 1,
                position: {