From b18bd2ff877f9183ea8dd04b5c0412a35e957ffc Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 6 Feb 2023 20:25:51 +0100 Subject: [PATCH] Fixed table dropdown menu overflow handling when columns are reordered (fixes #2130) --- public/js/grocy.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/js/grocy.js b/public/js/grocy.js index 653bfdef..d6d61143 100644 --- a/public/js/grocy.js +++ b/public/js/grocy.js @@ -971,15 +971,14 @@ $('.table').on('column-sizing.dt', function(e, settings) $('.dataTables_scrollBody').addClass("force-overflow-visible"); } }); -$('td .dropdown').on('show.bs.dropdown', function(e) +$(document).on("show.bs.dropdown", "td .dropdown", function(e) { - console.log("xx"); if ($('.dataTables_scrollBody').hasClass("no-force-overflow-visible")) { $('.dataTables_scrollBody').addClass("force-overflow-visible"); } }); -$("td .dropdown").on('hide.bs.dropdown', function(e) +$(document).on("hide.bs.dropdown", "td .dropdown", function(e) { if ($('.dataTables_scrollBody').hasClass("no-force-overflow-visible")) {