autocomplete from jquery UI dosent't work inside thickbox-window

127 Views Asked by At

I have a problem with jquery-ui autocomplete. It dosen't work, when I try to use it inside thickbox-window. Class ".ui-autocomplete-input" added to the input tag,but inspite it I can't see list of suggestions. How can I fix it?

1

There are 1 best solutions below

0
On

You cannot see the list of suggestions because it has too low z-index value and is in fact hidden behind the Thickbox. Thickbox's z-index used by Wordpress is quite high to provide reliable overlay effect. So, if you want to see the jquery autocomplete dropdown inside of Thickbox window (a div), you should add some custom css styling to it:

.ui-autocomplete {
    z-index: 1000000 !important;
}

When added to any css file enqueued for admin section after jquery-ui styles, this line should solve your issue. To enqueue custom style for admin section in Wordpress, you may use wp_enqueue_style() function.