Bug 42012 - e.preventDefault not called in clubs.tt club_hold_search handler
Summary: e.preventDefault not called in clubs.tt club_hold_search handler
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Paul Derscheid
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 24393
Blocks:
  Show dependency treegraph
 
Reported: 2026-03-06 12:02 UTC by Paul Derscheid
Modified: 2026-03-06 12:27 UTC (History)
1 user (show)

See Also:
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:


Attachments
Bug 42012: Fix missing preventDefault() call in clubs.tt (1.10 KB, patch)
2026-03-06 12:04 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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