In my Ruby on Rails app I was using jQuery UI 1.9.2 (through jquery-ui-rails
). I had an Autocomplete field in a Modal Dialog form that was populating it's dropdown suggestion box using Ajax and Json. It worked correctly, showing me the correct suggestions.
I subsequently upgraded to jQuery UI 1.10.3 (using bundle update
) and now the Autocomplete dropdown suggestion box is no longer working. It shows no error in the JavaScript console. In fact it shows that the Json that is returned is correct.
I have tried rewriting the autocomplete function in JS to perform the call manually (using the Autocomplete's source: $.ajax {}
call and still nothing.
It was suggested to me that the problem might be that jQuery changed something that caused the jquery-ui-rails
gem to stop working, but after submitting a bug ticket to them, it turns out that that is not the problem.
Any help would be appreciated.
NOTE to Answers:
mhu's answer is correct, and you should avoid tampering with the z-Indexes where possible (which is why I marked it as correct). However in my case (where the Autocomplete text box is in a Modal Dialog) the drop down will only be displayed within the width of the dialog box (if the text is wider than that, it is hidden and you cannot use the scrollbar). As I did not want that, I did what I described in my answer below and it works. I did make various comments and notes to myself to make sure it still works after any jQueryUI update.