From 757a28bf4f05fcf9a8f88787d49fbf5a19360b1b Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 19 Apr 2022 13:41:50 +0200 Subject: [PATCH] dashboard.js: Only handle `rendered` events we're interested in --- public/js/icinga/behavior/dashboards.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/js/icinga/behavior/dashboards.js b/public/js/icinga/behavior/dashboards.js index 2a16b7519..70f6a82e4 100644 --- a/public/js/icinga/behavior/dashboards.js +++ b/public/js/icinga/behavior/dashboards.js @@ -131,6 +131,12 @@ onRendered(e) { let _this = e.data.self; + + if (e.currentTarget !== e.target || ! e.target.querySelector(':scope > .dashboard-manager')) { + // This is for the editor only, which has no nested .containers but a .dashboard-manager + return; + } + e.target.querySelectorAll('.dashboard-settings, .dashboard-item-list, .dashlet-item-list') .forEach(sortable => { let groupName = _this.getTypeFor(sortable),