Problem/Motivation
A common request from clients is to not visit a link of opened dropdown menus but to close the link on click.
Proposed resolution
Add a new theme option 'Navbar open dropdown click behavior' with two options 'visit' and 'close'. Use this option in JS code to turn off current visit link.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff-3274026-6-8.txt | 4.17 KB | pivica |
| #8 | navbar-open-dropdown-behavior-3274026-8.patch | 7.56 KB | pivica |
Comments
Comment #2
pivica commentedHere is a patch.
Comment #3
pivica commentedSmall refactoring.
Comment #4
pivica commentedUploaded empty patch last time, here is a correct one.
Comment #5
pivica commentedFinally here is a same patch from 3 build on top of other active patches - handy for projects that are using other stuff that are still not committed.
Comment #6
pivica commentedI've noticed couple of problems:
1. We introduced a bug with #3117130: Second level dropdown menu issues - that check for menu level 0 when second level is horizontal was not properly checking is responsive menu active or not.
2. Edge case when second level is dropdown and second level link has third level links rendered - visiting of links is not possible.
Issue number 1. should be fixed, issue number 2. is mostly fixed - there is additional edge case which is easy to overcome with configuration changes.
NOTE: no idea about patch in comment 4, it seems it is not needed, patch in 5 is a valid one for both current dev and custom projects that are using other patches.
Comment #7
pivica commentedReminder - this needs documentation update!
Comment #8
pivica commentedProposing to rename new option from 'Navbar open dropdown click behavior' to 'Navbar opened submenu behavior'. Config key would be renamed form navbar_open_dropdown_click_behavior to navbar_opened_submenu_behavior.
Name changing is done for future support for both dropdown and horizontal submenus.
This is done in preparation for much bigger navbar issue which goal will be to bring various improvements and consolidation between all possible navbar options settings - stay tune for this, issue is still discussed internally, ddo issue(s) will be created after all discussion is done and we can start with implementation.
Comment #10
pivica commentedCommitted.