From 9b1f314df0c8604f419170b2f8edfd4c029a5f6c Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Thu, 10 Jan 2019 16:33:56 +0000
Subject: [PATCH] Bug 20959: (follow-up) Alternate: Add preventDefault to link
 controls

This patch adds a missing preventDefault to the function for showing and
hiding the checkin settings panel. This prevents the page from
unexpected scrolling when the link is clicked.

To test, apply the patch and go to Circulation -> Check in. Reduce the
height of the browser window until you have to scroll down to reveal the
"Checkin settings" link. Clicking it should not cause the page to
scroll.
---
 koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js
index 8bfd667..45e381b 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js
@@ -66,7 +66,8 @@ $(document).ready(function() {
         circ_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right");
     }
 
-    $("#show-circ-settings a").on("click",function(){
+    $("#show-circ-settings a").on("click",function(e){
+        e.preventDefault();
         if( circ_settings.is(":hidden")){
             circ_settings.show();
             circ_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down");
-- 
2.1.4