Problem when want to close dlgopen by click outside dialog

Situation
When using dlgopen to show dialog, I want to close dialog by click out side dialog.
I tried to read documentation of Open Emr, and searched problem by key word, but may be it not exactly key word.
So can anyone show me how can I do that or any similar topic about this problem?
Thank and sorry about poor grammar.

hi @ttv4897, did you look at the function?

not a problem and designed that why

ok, designed that way to not allow close by clicking outside the box?

yes, that function is the place I came to find solution first, but I don’t really understand how opts variable should write.
And what I need is when click outside the box, the dialog will close same way as click on close button.

Sorry, I don’t choose the right word. And If it is designed, then where I can find document about that?
I’m not too close with js so comment in function not help much.

Hello @ttv4897

This needs some additional work so as to customize the existing feature of dialogue box. I would be able to help you in the same.

Thanks,
Roshan

argh, so, you mean I can’t reuse dlgopen with current feature, but additional work?
Then, how you do it? Can you give me some advice?