[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX] Fix clickable parent menu items with children
"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a2ad74c71954_381959d83253d@gitlab-sidekiq-low-urgency-cpu-bound-v2-664f5d7498-bfbqw.mail> |
ushindi bienvenu pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
52195900 by UshindiG at 2026-06-11T15:35:00+00:00
[FIX] Fix clickable parent menu items with children
---
* [FIX] Fix clickable parent menu items with children
---
* [FIX] Fix clickable parent menu items with children
See merge request tikiwiki/tiki!9442
(cherry picked from commit c9ed050d04313c849fd10276017bf118912cd420)
See merge request tikiwiki/tiki!10498
- - - - -
1 changed file:
- tiki-setup.php
Changes:
=====================================
tiki-setup.php
=====================================
@@ -665,6 +665,22 @@ if ($prefs['jquery_smartmenus_enable'] == 'y') {
nav[indexCurrentNav].classList.add("sm-navbar");
nav[indexCurrentNav].querySelector("div.collapse").classList.add("sm-collapse");
const navigation = new SmartMenus(nav[indexCurrentNav], {collapsibleBehaviorAccordion: collapsible_behavior, dropdownsShowTrigger: noMouseoverBehavior, dropdownsHideTrigger: hideOnClick, dropdownsHideTimeout: 250, dropdownsShowTimeout: 200});
+
+ // Enable navigation on parent menu items with children
+ // SmartMenus uses .sm-sub-toggler class for parent items, which by default only toggle submenus
+ // This handler allows navigation when parent items have valid hrefs (not just "#" or empty)
+ // Note: Relies on SmartMenus internal class that may change in future versions
+ nav[indexCurrentNav].addEventListener("click", function(e) {
+ const link = e.target.closest("a.sm-sub-toggler");
+ if (link && nav[indexCurrentNav].contains(link)) {
+ const href = link.getAttribute("href");
+ if (href && href !== "#" && href !== "") {
+ e.preventDefault();
+ e.stopPropagation();
+ window.location.href = href;
+ }
+ }
+ });
}
}
');
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/52195900e49a5f7bb32fc33d6ff0cc85099caaf7
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/52195900e49a5f7bb32fc33d6ff0cc85099caaf7
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs