From 60d227585be7e548f98b4a7ea6722880871e391f Mon Sep 17 00:00:00 2001 From: "ahmet.can.kepenek" Date: Wed, 20 Mar 2024 00:05:26 +0200 Subject: [PATCH] fixed management ui popup auto close problem #10797 --- deps/rabbitmq_management/priv/www/js/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deps/rabbitmq_management/priv/www/js/main.js b/deps/rabbitmq_management/priv/www/js/main.js index e47ac0a14e4d..1bb37646fac0 100644 --- a/deps/rabbitmq_management/priv/www/js/main.js +++ b/deps/rabbitmq_management/priv/www/js/main.js @@ -698,9 +698,13 @@ function show_popup(type, text, _mode) { hide(); $('#outer').after(format('popup', {'type': type, 'text': text})); $(cssClass).fadeIn(100); - $(cssClass + ' span').on('click', function () { + + var closeButtonCssClass = cssClass + ' span'; + $('div#outer,' + closeButtonCssClass).on('click', function(event) { + if ($(event.target).eq($(closeButtonCssClass)) || !$(event.target).closest(cssClass).length) { $('.popup-owner').removeClass('popup-owner'); hide(); + } }); }