Bugzilla – Attachment 189148 Details for
Bug 41200
Refocus certain elements on hide or remove
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41200: Refocuses add to cart after removal
Bug-41200-Refocuses-add-to-cart-after-removal.patch (text/plain), 1.84 KB, created by
Jake Deery
on 2025-11-06 09:08:37 UTC
(
hide
)
Description:
Bug 41200: Refocuses add to cart after removal
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2025-11-06 09:08:37 UTC
Size:
1.84 KB
patch
obsolete
>From dcfc7691d664393256e90b85de43f1b8b52aaf87 Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >Date: Thu, 2 Oct 2025 12:46:57 +0000 >Subject: [PATCH] Bug 41200: Refocuses add to cart after removal > >This patch hopes to resolve disappearing focus when one clicks 'remove' >on a present card item on the results page, by pushing the focus back to >add to cart when the remove button is selected. > >== TO TEST == >a) ensure opacbookbag is set to Allow >b) search for 'history', and add an item to cart via the results page >c) use the 'remove' button found on the same record row as in steb b) >d) press tab, and notice how the focus moves somewhere else entirely >== APPLY PATCH == >e) repeat steps a-c >f) notice how this time the focus returns to the nearby add to cart >== SIGN OFF == >--- > koha-tmpl/opac-tmpl/bootstrap/js/basket.js | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >index e4a9c5f5aef..41dca80f2f5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >@@ -470,7 +470,8 @@ function updateLink(val, op, target) { > __("Add to cart") > ) > .removeClass("incart") >- .addClass("addtocart cart" + val); >+ .addClass("addtocart cart" + val) >+ .focus(); > target.$("a.cartR" + val).hide(); > } > } else { >@@ -489,7 +490,8 @@ function updateLink(val, op, target) { > __("Add to cart") > ) > .removeClass("incart") >- .addClass("addtocart cart" + val); >+ .addClass("addtocart cart" + val) >+ .focus(); > $("a.cartR" + val).hide(); > } > } >-- >2.50.1 (Apple Git-155)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41200
: 189148 |
189149