From 3d63dd6eb73961837f0792484ef5d7636f2e8c2e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 29 Sep 2022 12:20:30 +0000 Subject: [PATCH] Bug 31653: Correct event names passed to jQuery on() function This patch replaces the obsolete .on("hover") with .on("mouseenter mouseleave"). This will allow the code to work again following the last jQuery upgrade. See Bug 20217 for discussion of the original implementation: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20217#c14 To test, apply the patch and go to the staff interface. Hover your mouse over the "Search" link in the header menu. The adjacent dropdown menu button should have its hover state triggered. Signed-off-by: David Nind Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 6a3bded6d3597128bcad3477dbf152abe189eb44) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index f2becd2a7f..de0e442efa 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -110,7 +110,7 @@ $(document).ready(function() { $("a[href$=\"/" + path + params + "\"]", navmenulist).addClass("current"); } - $("#catalog-search-link a").on("hover", function(){ + $("#catalog-search-link a").on("mouseenter mouseleave", function(){ $("#catalog-search-dropdown a").toggleClass("catalog-search-dropdown-hover"); }); -- 2.39.5