Bug 42012

Summary: e.preventDefault not called in clubs.tt club_hold_search handler
Product: Koha Reporter: Paul Derscheid <paul.derscheid>
Component: TemplatesAssignee: Paul Derscheid <paul.derscheid>
Status: Needs Signoff --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: minor    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 24393    
Bug Blocks:    
Attachments: Bug 42012: Fix missing preventDefault() call in clubs.tt

Description Paul Derscheid 2026-03-06 12:02:37 UTC
In clubs/clubs.tt, the .club_hold_search click handler uses e.preventDefault instead of e.preventDefault(). This was probably a typo or similar in Bug 24393.

This references the method without calling it, so the default anchor action is never prevented. Since the element is an <a href="#">, clicking "Search to hold" causes the page to scroll to the top.
Comment 1 Paul Derscheid 2026-03-06 12:04:23 UTC
Created attachment 194689 [details] [review]
Bug 42012: Fix missing preventDefault() call in clubs.tt

- e.preventDefault was missing parentheses, so the default
  action was never actually prevented
- The element is an <a href="#"> link, so clicking it would
  cause the page to scroll to top