Skip to content
Permalink
Browse files
Autocomplete: Insert the live region before the input. Fixes #9172 - …
…Autocomplete: .replaceWith() fails to replace.

(cherry picked from commit ff11b69)
  • Loading branch information
scottgonzalez committed Apr 17, 2013
1 parent 25f6c50 commit 2da014b11d264a49c7ad7075d1fdb66a7d3f009c
Showing 2 changed files with 11 additions and 1 deletion.
@@ -188,4 +188,14 @@ test( "ARIA", function() {
"Live region for multiple values" );
});

test( ".replaceWith() (#9172)", function() {
expect( 1 );

var element = $( "#autocomplete" ).autocomplete(),
replacement = "<div>test</div>",
parent = element.parent();
element.replaceWith( replacement );
equal( parent.html(), replacement );
});

}( jQuery ) );
@@ -296,7 +296,7 @@ $.widget( "ui.autocomplete", {
"aria-live": "polite"
})
.addClass( "ui-helper-hidden-accessible" )
.insertAfter( this.element );
.insertBefore( this.element );

// turning off autocomplete prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete

0 comments on commit 2da014b

Please sign in to comment.