在IE浏览器中,点击标题栏/关闭图标对话框将调整大小,此后点击关闭图标时,关闭事件将被触发。代码在FF和chrome中工作。我正在使用jquery UI v1.10.4
$('#dialogBox').dialog({
title: title,
width: 'auto',
position: "center",
resizable: false,
modal: true,
autoOpen: false,
open: function (args) {
$(this).parent().zIndex(50);
$(document).find(".ui-widget-overlay.ui-front").last().zIndex(40);
},
buttons: {
OK: {
text: "OK",
icons: {
primary: "ui-icon-check"
},
"class": "dialog-button",
click: function () {
$(this).dialog("close");
// do something
}
},
Cancel: {
text: "Cancel",
icons: {
primary: "ui-icon-close"
},
"class": "dialog-button",
click: function () {
$(this).dialog("close");
}
}
},
close: function (event, ui) {
$(this).dialog("close");
}
});