From 80e46c93a84c8720cbd4aa206c46e4ac2a2d84f7 Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 14 Dec 2012 09:10:32 -0500 Subject: Autocomplete: Append to closest .ui-front if available. --- tests/unit/autocomplete/autocomplete_common.js | 2 +- tests/unit/autocomplete/autocomplete_options.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/unit/autocomplete') diff --git a/tests/unit/autocomplete/autocomplete_common.js b/tests/unit/autocomplete/autocomplete_common.js index e1d24ef8d..63b24d384 100644 --- a/tests/unit/autocomplete/autocomplete_common.js +++ b/tests/unit/autocomplete/autocomplete_common.js @@ -1,6 +1,6 @@ TestHelpers.commonWidgetTests( "autocomplete", { defaults: { - appendTo: "body", + appendTo: null, autoFocus: false, delay: 300, disabled: false, diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index 913f5bc28..9f0bd2d43 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -18,11 +18,11 @@ test( "appendTo", function() { equal( $( "#ac-wrap2 .ui-autocomplete" ).length, 0, "only appends to one element" ); element.autocomplete( "destroy" ); - element.autocomplete({ - appendTo: null - }); - equal( element.autocomplete( "widget" ).parent()[0], document.body, "null" ); + $( "#ac-wrap2" ).addClass( "ui-front" ); + element.autocomplete(); + equal( element.autocomplete( "widget" ).parent()[0], $( "#ac-wrap2" )[0], "null, inside .ui-front" ); element.autocomplete( "destroy" ); + $( "#ac-wrap2" ).removeClass( "ui-front" ); element.autocomplete().autocomplete( "option", "appendTo", "#ac-wrap1" ); equal( element.autocomplete( "widget" ).parent()[0], $( "#ac-wrap1" )[0], "modified after init" ); -- cgit v1.2.3