The cart window in both the Staff Client and the OPAC becomes unresponsive as does the originating window if you check and uncheck boxes in the cart in a certain sequence. To replicate: - Search the catalog in the staff client and/or OPAC - Add 3 or more titles to the cart - Open the cart via the button in the top menu - Click "Select all" - Uncheck the first checkbox - Click "Clear all"
I believe this is happening when the change event is triggered in cart.js. I don't understand why change() is being used here and I don't think it is necessary.
Created attachment 166788 [details] [review] Bug 36862: Remove jQuery change() event To test: 1 - Search the catalog in the staff client and/or OPAC 2 - Add 3 or more titles to the cart 3 - Open the cart via the button in the top menu 4 - Click "Select all" 5 - Uncheck the first checkbox 6 - Click "Clear all" 7 - APPLY PATCH, clear browser cache 8 - Try again, the browser should not crash.
For me, the change works fine in the staff interface, but not in the OPAC. That is, still experience the described issue. Tested in Firefox Developer Edition and Chromium.
(In reply to David Nind from comment #3) > For me, the change works fine in the staff interface, but not in the OPAC. > That is, still experience the described issue. > > Tested in Firefox Developer Edition and Chromium. Thanks David, I didn't do the OPAC. But I have a patch incoming. On the OPAC, when using #CheckAll or #CheckNone there is also a call to selRecord(). I don't see why we need to do so if all we are doing is checking/unchecking the checkboxes!
Created attachment 166840 [details] [review] Bug 36862: Remove call to selRecord() on the OPAC
Thanks Lucas! Just to confirm that it now works as expected for the staff interface and OPAC. David
Seems that we need the selRecord calls to update the list of items to be sent. I can now deselect items and still receive them with Send.
(In reply to Marcel de Rooy from comment #7) > Seems that we need the selRecord calls to update the list of items to be > sent. I can now deselect items and still receive them with Send. Ah yes, I think this problem is actually coming from delRecord() which is called from within selRecord()
I can replicate this problem in version 23.11 but not in 24.05.