search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to disable close modal window on background clicked

Asked by javier
6 years ago.

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

Answer posted by Dan Letecky [DayPilot]
6 years ago.

It's in .update() method and it looks like this:

window.setTimeout(function() {
    This.hideDiv.onclick = function() { This.hide(); };
}, 500);

In v2.2 it's line 190.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.