https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43991

--- Comment #1 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 210392
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210392&action=edit
Bug 43991: Pickup location change modal is unusable on narrow OPAC screens

On the OPAC summary page, the "Change" pickup location modal for each
hold is rendered inside the "Pickup location" table cell of the holds
table. On narrow viewports DataTables Responsive hides that column
(td.dtr-hidden, display:none) and copies its markup into the expanded
child row. This leaves two elements with the same id: the real modal in
the hidden cell, and a dead copy in the child row.

Bootstrap resolves data-bs-target="#changePickupN" to the first match,
the one inside the hidden cell. The backdrop (appended to <body>) is
shown, but the dialog has no layout box, so the patron sees a greyed out
page with no way to pick a library or dismiss the modal.

Render the modals after the table instead, in their own loop. The
"Change" button keeps working in the child row because it only needs the
id to be unique and reachable from <body>. This matches how the suspend
hold modal is already handled on the same page.

To test:
1. Enable OPACAllowUserToChangeBranch (e.g. "pending,intransit,suspended")
2. Place a hold for a patron whose hold can be changed to another
   pickup library
3. Log in to the OPAC as that patron at a narrow viewport (e.g. browser
   devtools device emulation, 375px wide), and open the Holds tab
4. Expand the hold row with the "+" control and press "Change" next to
   the pickup location
5. Without the patch: the page greys out and no dialog is visible
6. Apply the patch and reload; repeat
7. Confirm the dialog is visible, pick another library, press Save and
   confirm the pickup location changes
8. Repeat at desktop width and confirm the modal still works there
9. Confirm the page contains no duplicate ids: in the console run
   document.querySelectorAll('[id="changePickup1"]').length and expect 1

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to