This might be what you're looking for. Pass this as an option when you make your dialog
'$("#blah").dialog({closeOnEscape: false});'
Domanda
Why does Jquery UI dialog called every time on escape key press? how to stop triggering open dialog on clicking escape?
$(document).keyup(function (e) {
// esc
if (e.keyCode == 27) {
e.stopPropagation();
}
});
Soluzione
This might be what you're looking for. Pass this as an option when you make your dialog
'$("#blah").dialog({closeOnEscape: false});'