From e3ffe908ad185e36354750c5735325bdf401d2e6 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 17 Feb 2023 11:39:58 +0100 Subject: [PATCH] Bug 30975: Call preventDefault only for click events --- koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js index 30020e7f5a..08a3fc7f74 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js +++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js @@ -604,7 +604,11 @@ function registerFrameworkPluginHandler(name, eventType, handler) { } $(document).ready(function() { function callPluginEventHandler (event) { - event.preventDefault(); + // Prevent "jump to top" + if (event.type === 'click') { + event.preventDefault(); + } + event.stopPropagation(); const plugin = event.target.getAttribute('data-plugin'); -- 2.30.2