I found this:
You can disable closing the dialog on background click by commenting out line 286 in modal.js:
hide.onclick = function() { This.hide(); };
But it's dangerous - if something goes wrong in the dialog page [showUrl()] it will not be possible to close the dialog window and the background page will be inaccessible. This can happen if the close button is not rendered properly - e.g. when the dialog page throws an exception.
BUT I CAN'T FIND this code line in modal 2.2
Thanks in advance