This is really perplexing. I'm opening a dialog upon return from an
ajax() call, using the returned html as the container. I've done
this before in another application with no problem. However, in this
app, everything works OK with the popup, except that the close button is
disabled, and I am not disabling it anywhere in my code. Here's the
call to dialog (in coffeescript):
- $.fn.openDialog
= ->
container = $(this[0])
container.dialog
autoOpen: true
height:
"auto"
width: "700px"
title:
container.attr("title")
modal: false
close: ->
$(this).dialog("destroy")
So my ajax calls looks like this:
- $(document).on
"click", "<whatever selector>", (e)
->
$.ajax
url: <the url>
success:
(data, status, xhr) ->
$(data).openDialog()
And the generated HTML comes out looking like this:
-
<button
class="ui-button ui-widget
ui-state-default ui-corner-all ui-button-disabled
ui-state-disabled ui-button-icon-only ui-dialog-titlebar-close"
role="button"
aria-disabled="false"
title="close"
>
I've also tried adding "disabled: false" to the dialog
call, but it didn't do anything.
Note that it includes the classes ui-button-disabled and
ui-state-disabled, but aria-disabled is false.
This is a Rails 3.2 application and the jQuery UI dialog version is 1.10.3