From d56226d7378f627d46012a8f2dcf196c1d99c002 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 26 Jul 2024 16:32:12 +0000 Subject: [PATCH] Bug 37373: Combine duplicate class attributes This patch corrects two instances in patron-search.inc where there were two class attributes on one input. Combining the two class names under one class attribute seems to fix the focus problem. The patch also updates the global JS giving focus to elements with a "focus" class so that it only targets elements which are visible. This prevents the browser from trying to put focus on a field in a hidden modal. Signed-off-by: Andrew Fuerste Henry Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 4 ++-- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index 0956c118e0..5b2e3f23a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -13,7 +13,7 @@ [% BLOCK patron_search_filters_simple %]
Enter patron card number or partial name:
- +
[% END %] @@ -36,7 +36,7 @@
  1. - +
  2. [% FOR f IN filters %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index ceaf8b8d57..0fbedbff84 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -130,7 +130,8 @@ $(document).ready(function () { } }); - $(".focus").focus(); + $(".focus:visible").focus(); + $(".validated").each(function () { $(this).validate(); }); -- 2.39.5