]> git.ktnx.net Git - lsl.git/commitdiff
close modal dialogs on click outside the dialog
authorDamyan Ivanov <dmn@debian.org>
Sun, 6 Mar 2022 20:12:35 +0000 (20:12 +0000)
committerDamyan Ivanov <dmn@debian.org>
Sun, 6 Mar 2022 20:12:35 +0000 (20:12 +0000)
public/javascripts/lsl.js

index 942f2498f011a8ade58f9dcee7204604662196cd..35e70b4a1725ba1d77697ef9871d1de7d54ea3a7 100644 (file)
@@ -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');
+    });
 });
 })();