问题
I have got the following issue:
A jQuery UI dialog is open, then a fancybox popup is open from that dialog.
I press Esc button and expect only the fancybox popup to be closed but this closes the jQuery dialog as well.
How do I prevent this behavior?
回答1:
Try this
$( ".selector" ).dialog({ closeOnEscape: false });
来源:https://stackoverflow.com/questions/12819555/fancybox-is-shown-from-jquery-ui-dialog-pressing-esc-button-closes-both-dialogs