From b26d0c621ee92c57f5d55d76002387b7578b2c2b Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 6 Mar 2022 20:12:35 +0000 Subject: [PATCH] close modal dialogs on click outside the dialog --- public/javascripts/lsl.js | 3 +++ 1 file changed, 3 insertions(+) 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'); + }); }); })(); -- 2.39.5