[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Fix clickable parent menu items with children
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6983936de92a9_3b1843188936d@gitlab-sidekiq-low-urgency-cpu-bound-v2-7d899c995b-qj75j.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
c9ed050d by UshindiG at 2026-02-04T18:34:52+00:00
[FIX] Fix clickable parent menu items with children
---
* [FIX] Fix clickable parent menu items with children
See merge request tikiwiki/tiki!9442
- - - - -
1 changed file:
- tiki-setup.php
Changes:
=====================================
tiki-setup.php
=====================================
@@ -704,6 +704,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/c9ed050d04313c849fd10276017bf118912cd420
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c9ed050d04313c849fd10276017bf118912cd420
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs