If you're scrolled down on the OPAC bibliographic detail page and click the "Send to device" link, the page jumps up to the top because the click handler doesn't have a "return false" or "event.preventDefault()".
Created attachment 146857 [details] [review] Bug 32999: Click handler to show QR code in OPAC lacks preventDefault This patch adds "preventDefault()" to the click handler for showing the bibliographic detail QR code. This prevents the page from scrolling to the top when the user clicks the link. To test, apply the patch and make sure the OPACDetailQRCode system preference is enabled. Locate a bibliographic record and view the detail page. If necessary, reduce the size of your browser window so that you have to scroll down a bit to bring the "Send to device" menu item into view in the sidebar. Click the link to confirm that it shows the QR code and that the page doesn't jump to the top.
Created attachment 146869 [details] [review] Bug 32999: Click handler to show QR code in OPAC lacks preventDefault This patch adds "preventDefault()" to the click handler for showing the bibliographic detail QR code. This prevents the page from scrolling to the top when the user clicks the link. To test, apply the patch and make sure the OPACDetailQRCode system preference is enabled. Locate a bibliographic record and view the detail page. If necessary, reduce the size of your browser window so that you have to scroll down a bit to bring the "Send to device" menu item into view in the sidebar. Click the link to confirm that it shows the QR code and that the page doesn't jump to the top. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 146900 [details] [review] Bug 32999: Click handler to show QR code in OPAC lacks preventDefault This patch adds "preventDefault()" to the click handler for showing the bibliographic detail QR code. This prevents the page from scrolling to the top when the user clicks the link. To test, apply the patch and make sure the OPACDetailQRCode system preference is enabled. Locate a bibliographic record and view the detail page. If necessary, reduce the size of your browser window so that you have to scroll down a bit to bring the "Send to device" menu item into view in the sidebar. Click the link to confirm that it shows the QR code and that the page doesn't jump to the top. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
Backported to 22.05.x for upcoming 22.05.11
applied to 21.11.x for 21.11.19
Not backported to 21.05.x