From: Damyan Ivanov Date: Sun, 6 Mar 2022 20:12:35 +0000 (+0000) Subject: close modal dialogs on click outside the dialog X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=b26d0c621ee92c57f5d55d76002387b7578b2c2b;p=lsl.git close modal dialogs on click outside the dialog --- diff --git a/public/javascripts/lsl.js b/public/javascripts/lsl.js index 942f249..35e70b4 100644 --- a/public/javascripts/lsl.js +++ b/public/javascripts/lsl.js @@ -455,5 +455,8 @@ $(function(){ }); $('#list-items').on('change', '.list-item-row input[type="checkbox"]', handle_list_item_state_changed); load_lists(); + $('body').on('click', '.ui-widget-overlay', (ev) => { + $(ev.target).siblings('.ui-dialog').find('.ui-dialog-content').dialog('close'); + }); }); })();