Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
sorry to be an issue b!tch but the drop downs are acting weird like
the Bootstrap OnClick default behavior seems to be still in evidence, which wasn't the case in Radix 2, and frankly, I think is a bad design decision by the Bootstrap peeps
also, if you need to then click through to the parent of a menu to get the arrrow showing there are children
if I had time to work out the d.o image file UI I'd make a nice issue ticket for you
but damn it, my family needs to eat
got to go and thanks for all the hard work
Radix 3 looks great, has some wrinkles, but they can be smoothed out quickly I am sure
Comment | File | Size | Author |
---|---|---|---|
#19 | megamenu-dropdown-issue-2182401-19.patch | 1.01 KB | Bandana.kaur |
Selection_007.png | 9.87 KB | niccolox | |
Selection_006.png | 3.57 KB | niccolox | |
Selection_005.png | 3.68 KB | niccolox |
Comments
Comment #1
shadcn CreditAttribution: shadcn commentedYeah. Bootstrap by default is click to show dropdown. For Radix 2.x, we had some custom js to add the hovers.
See http://drupalcode.org/project/radix.git/blob/refs/heads/7.x-2.x:/assets/...
Comment #2
niccolox CreditAttribution: niccolox commentedis that onhover menu js migrating to Radix 3?
Comment #3
niccolox CreditAttribution: niccolox commentedoh, and I just remembered the Panopoly menu system requires you to click through Main Menu > Parent > Check Enabled > Check Expanded for the arrow down menu icon to appear
thats my bad, pretty sure have asked this one before... if I remember correctly, it doesn't work like that on Open Outreach at least....
Comment #4
barraponto CreditAttribution: barraponto commented@niccolo try https://github.com/CWSpear/bootstrap-hover-dropdown
Comment #5
shadcn CreditAttribution: shadcn commentedComment #6
lsolesen CreditAttribution: lsolesen commented@arshadcn After thinking about this - is it a good idea to add the hovers - or is it better just sticking with the default bootstrap behavior and leave it up to the developer to add the hover, if they want that?
Comment #7
shadcn CreditAttribution: shadcn commented@lsolesen, I've been thinking about this too and I think this is the best approach. Let's see what others think.
Comment #8
niccolox CreditAttribution: niccolox commentedpersonally, I think menu's should always expand onhover when in anything resembling a normal web browser experience
on smaller screens i.e. mobiles, the onclick should be standard
so, Bootstrap is a bit off imho
Comment #9
barraponto CreditAttribution: barraponto commentedI think we should follow Bootstrap's defaults, but adding a setting to activate onhover is welcome :)
Comment #10
astringer CreditAttribution: astringer commentedArghh... The hover is really not working with my current project. I'm using YAMM style mega menus and the hover doesn't work well for them. Click is better for large menus.
Commenting out the dropdown on hover fixes my problem, but . . . I don't want to alter the base theme.
I know this is more of a general theming question, but what is the best way to remove this JS in the sub theme? I've found several examples of js_alter, but none seem to really do what I want to do (remove or nullify those lines of code.)
Hooks are a little advanced for me. But I'm learning. Thank you.
Comment #11
shadcn CreditAttribution: shadcn commentedWe're going to have dropdown shown by default. I'm linking the other issue here: #2459429: Show drop downs on main menu at all times.
Comment #12
shadcn CreditAttribution: shadcn commentedComment #13
shadcn CreditAttribution: shadcn commented@astringer, take a look at an implementation of hook_js_alter in Radix. https://github.com/radixtheme/radix/blob/7.x-3.x/template.php#L89
This might help.
Comment #14
astringer CreditAttribution: astringer commentedThanks arshadcn. I appreciate the help. That gets me closer to where I need to be, I think I can figure out the rest.
For what it's worth I agree with barraponto -- I think it's best to stick with Bootstrap default behaviors and allow the option of turning on the hover or adding it. Or better yet turning it on for certain screen sizes.
Additionally at less than md screen sizes the behavior was wonky. This was because the top menu link was turned on -- so when I clicked to open the submenu, I was taken to the top link.
Once again thanks for the help. I really appreciate it.
Comment #15
astringer CreditAttribution: astringer commentedHi, I'm back here dealing with this again on another project. Stopped by to see if there was an update.
I think the OP's reporting the original Bootstrap behavior as a bug is not well thought out. Bootstrap is mobile-first, there is no hover state on mobile devices.
It makes no sense to have desktop-only navigation in a responsive framework.
Should I make a separate issue for this?
Comment #16
kopeboy CreditAttribution: kopeboy commentedSo, how to activate the dropdown on hover for the main menu?!
Also, I notice that if I copy-paste the dropdown example from getbootstrap.com, that will work on HOVER, why that isn't the case for the generated main menu?
Comment #17
rooby CreditAttribution: rooby commentedThis menu is a huge WTF at the moment.
Currently my top level items with drop downs are completely broken.
It looks like the href has been replaced with "" but I get hover behaviour, so when I click the item it just refreshes the page (because of no href).
Comment #18
rooby CreditAttribution: rooby commentedMy quick work around for my issues is overriding the radix_dropdown behaviour in my theme's JS, like this:
Comment #19
Bandana.kaur CreditAttribution: Bandana.kaur commentedWe have found the same issue with the mega menu and quick work around.
Attaching a patch for the same.