settings: Prevent backdrop leak when clicking outside of modal.

Fixes #3791 and closes #3794
This commit is contained in:
Cynthia Lin 2017-08-29 10:06:31 -07:00 committed by showell
parent f697e6bb0e
commit ec36382857
1 changed files with 9 additions and 0 deletions

View File

@ -42,6 +42,15 @@ $("body").ready(function () {
}); });
$("body").on("click", "[data-sidebar-form-close]", close_sidebar); $("body").on("click", "[data-sidebar-form-close]", close_sidebar);
$("#settings_overlay_container").click(function (e) {
if (!overlays.is_modal_open()) {
return;
}
e.preventDefault();
e.stopPropagation();
overlays.close_active_modal();
});
}); });