mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Autocomplete: changed autoFocus default to true for 1.9. Fixed #7042 - Autocomplete: Default autoFocus to true
This commit is contained in:
@@ -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" );
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
var autocomplete_defaults = {
|
||||
appendTo: "body",
|
||||
autoFocus: false,
|
||||
autoFocus: true,
|
||||
delay: 300,
|
||||
disabled: false,
|
||||
minLength: 1,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
2
ui/jquery.ui.autocomplete.js
vendored
2
ui/jquery.ui.autocomplete.js
vendored
@@ -22,7 +22,7 @@ $.widget( "ui.autocomplete", {
|
||||
defaultElement: "<input>",
|
||||
options: {
|
||||
appendTo: "body",
|
||||
autoFocus: false,
|
||||
autoFocus: true,
|
||||
delay: 300,
|
||||
minLength: 1,
|
||||
position: {
|
||||
|
||||
Reference in New Issue
Block a user