mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Autocomplete: Insert the live region before the input. Fixes #9172 - Autocomplete: .replaceWith() fails to replace.
This commit is contained in:
parent
f281ce9e6c
commit
ff11b69a67
@ -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 ) );
|
||||
|
2
ui/jquery.ui.autocomplete.js
vendored
2
ui/jquery.ui.autocomplete.js
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user