Autocomplete: changed autoFocus default to true for 1.9. Fixed #7042 - Autocomplete: Default autoFocus to true

This commit is contained in:
Richard Worth
2011-03-15 05:48:31 -04:00
parent 09215ef2cd
commit 2f5eadeb8f
4 changed files with 5 additions and 2 deletions

View 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" );

View File

@@ -4,7 +4,7 @@
var autocomplete_defaults = {
appendTo: "body",
autoFocus: false,
autoFocus: true,
delay: 300,
disabled: false,
minLength: 1,

View 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) {

View File

@@ -22,7 +22,7 @@ $.widget( "ui.autocomplete", {
defaultElement: "<input>",
options: {
appendTo: "body",
autoFocus: false,
autoFocus: true,
delay: 300,
minLength: 1,
position: {