https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43114 --- Comment #16 from Andrii Nugged <nugged@gmail.com> --- Created attachment 212862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212862&action=edit Bug 43114: Close the slip window after the print dialog Register the afterprint listener before calling print(), since the event can fire before print() returns. Wait 100 ms after afterprint so the browser can finish closing the dialog before closing the popup. Spine labels use the same handler when SpineLabelAutoPrint is enabled. With the preference disabled, the label opens as an editable preview and staff can choose when to print it. The custom IntranetSlipPrinterJS path is unchanged. Test plan: Before applying the patch: 1. Leave IntranetSlipPrinterJS empty and check out an item to a test patron. 2. In Firefox, use Print > Print quick slip from the checkout page. Print the slip and check whether the popup closes. Repeat with Cancel. Apply the patch. After applying the patch: 1. In Firefox and Chromium, repeat the quick slip with Print and Cancel. The popup closes after either action. 2. Enable SpineLabelAutoPrint. Open Cataloging > Quick spine label creator, enter the item barcode and click View spine label. 3. The print dialog opens automatically. Try Print and Cancel on separate attempts in each browser. The label popup closes each time. 4. Disable SpineLabelAutoPrint and open the same label in each browser. The preview opens without a print dialog. Click Edit this label and change its text. Click Print this label. Check the printed text. Reopen the preview and repeat the manual print with Cancel. Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are watching all bug changes.