aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
Diffstat (limited to 'interface')
-rw-r--r--interface/js/app/rspamd.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 171812a0c..711ec1971 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -468,6 +468,19 @@ function ($, D3pie, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_
custom_locale = $(localeTextbox).val();
validateLocale(true);
});
+
+ // Dismiss Bootstrap popover by clicking outside
+ $("body").on("click", function (e) {
+ $(".popover").each(function () {
+ if (
+ // Popover's descendant
+ $(this).has(e.target).length ||
+ // Button (or icon within a button) that triggers the popover.
+ $(e.target).closest("button").attr("aria-describedby") === this.id
+ ) return;
+ $(this).popover("hide");
+ });
+ });
}());
$("#selData").change(function () {