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.
(cherry picked from commit ff11b69a67
)
This commit is contained in:
parent
25f6c509c1
commit
2da014b11d
@ -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