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 <david@davidnind.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2022-09-29 12:20:30 +00:00 committed by Tomas Cohen Arazi
parent a5104a8562
commit 6a3bded6d3
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 1 additions and 1 deletions

View File

@ -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");
});