Bugzilla – Attachment 185930 Details for
Bug 40726
Clicking off of a dropdown in the user menu branch switching closes the dropdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40726: Prevent closing the user menu when clicking off of the dropdown
Bug-40726-Prevent-closing-the-user-menu-when-click.patch (text/plain), 1.86 KB, created by
Laura Escamilla
on 2025-08-29 14:19:40 UTC
(
hide
)
Description:
Bug 40726: Prevent closing the user menu when clicking off of the dropdown
Filename:
MIME Type:
Creator:
Laura Escamilla
Created:
2025-08-29 14:19:40 UTC
Size:
1.86 KB
patch
obsolete
>From 3625b7bc4684ba50dc69c4d6789099895a65f07b Mon Sep 17 00:00:00 2001 >From: Laura_Escamilla <laura.escamilla@bywatersolutions.com> >Date: Fri, 29 Aug 2025 14:16:04 +0000 >Subject: [PATCH] Bug 40726: Prevent closing the user menu when clicking off of > the dropdown >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: > >1. In the staff interface click on the user menu (top right corner where it has the user and library branch). >2. Click the gear icon. >3. Try to click a dropdown but miss it and click outside of it (still in the grey box area). >4. View the menu collapsing. >5. Apply the patch & restart all. Refresh your page. >6. Retry steps 1-3. Notice now that when you click within the grey box area around the drop down the user menu no longer closes. However, if you click outside of the dropdown menu (anywhere else on the interface screen) the user menu closes. >7. Sign off รข have an amazing day! :D >--- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index ed6f0b35f7..687b2a7218 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -443,6 +443,19 @@ $(document).ready(function () { > } > }); > >+ (function () { >+ const trigger = document.getElementById("logged-in-menu"); >+ if (trigger) { >+ bootstrap.Dropdown.getOrCreateInstance(trigger, { >+ autoClose: "outside", >+ }); >+ } >+ })(); >+ >+ $("#setlibrary_panel").on("click", function (e) { >+ e.stopPropagation(); >+ }); >+ > $("#logged-in-dropdown").on("hidden.bs.dropdown", function () { > $("#setlibrary_panel") > .removeClass("setlibrary_panel_open") >-- >2.39.5
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 40726
: 185930