Ticket #4065
Ticket #4065
While working on http://dev.jqueryui.com/ticket/4065, which I have
posted some information specifically about in the ticket, I believe I
found another bug that I haven't seen reported, but that seems
orthogonal. Using the code provided in the ticket:
$("#oo_add_img_box")
.dialog({
modal: true,
buttons: {
'OK': function() {
$(this).dialog('close');
}
}
})
.dialog('close');
I have found that unlike previous versions of the .dialog function,
when binding the that code in a click-handler of a (button/<a />/etc)
is that after you click the trigger the first time and close the
dialog, re-clicking the link to trigger the pop-up has no effect. The
click handler is still bound to the link, but the invocations of jQuery
("#target").dialog({...}) are not re-opening the box. To get proper
behavior I had to bind the above code in a ready function, and then
for the click handler bind jQuery("#target").dialog("open"). I have
found where the code is that's causing the problem in ui.core.js, but
while I think it's a bug based on how I'ved used .dialog(...) in the
past, I'm not sure if the development team would agree. Any opinions?
Thanks,
Jeremy