Fancybox is shown from jQuery UI Dialog: pressing

2019-09-20 13:08发布

问题:

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 });