Closed (fixed)
Project:
Superfish Dropdown Menu
Version:
6.x-1.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2010 at 15:19 UTC
Updated:
28 Dec 2013 at 07:20 UTC
Jump to comment: Most recent
Comments
Comment #1
peterparker commentedI appear to be having the very same difficulty, with the small exception that it is not the first childmenu which always appears expanded.
Comment #2
Jeff Burnz commentedAfter some digging I can see this is perhaps an issue with the actual Drupal site, although I am not sure at this stage (I'm pretty sure its a bug in one of the modules being used on this site). I enabled the standard menu blocks and the even when I set everything to not-expanded the menu item in question is still expanded.
Comment #3
peterparker commentedI am away from the computer for a moment but I fixed the problem last night by changing a false to a true in one of the js files. I don't remember which one, or exactly which line, except that the line was commented along the lines of "hover handler." No adverse effect yet.
Comment #4
asb commentedHas anyone further investigated this issue? I'm trying to get acertain submenu to expand by default (without hovering over it), so basically I'd like to reproduce the issue you've experienced. Since the superfish plugin supports this behaviour by default and the 'superfish' menu doesn't, I'm changing this issue into a feature request.
According to the superfish documentation for the nav-bar style, this is accomplished by initialising the menu like so:
I believe that we need a feature to tell Drupal to which menu should get the class 'current' by default.
Any suggestions?
Thanks & greetings, -asb
Comment #5
mehrpadin commentedHe there,
Both pathClass & pathLevels will be available with the next version, and I'm about to test this module http://drupal.org/project/menu_attributes for the custom class thing, hopefully it'll do the trick.
Comment #6
asb commentedThanks, I believe that pathClass and pathLevels will be a huge leap for the 'Superfish' module (at least if we can figure out how to use it properly ;)
Comment #7
peacog commentedHi
I have the same problem as the original poster - the child menu is always expanded because for some reason the sfHover class is not being removed from the parent. Did either of you who had the problem fix it, and if so can you share how you did it?
Thanks
Comment #8
peacog commentedI solved my problem. Here's what happened. Because I was concentrating on themeing the menu, I had quickly set it up without creating a unique node for each menu item to point to. I randomly selected nodes for my menu items, and had more than one pointing to
<front>. The result of this was that the active-trail was being set for parent items when I wasn't expecting it, and this in turn caused sfHover to be set. So be careful to set up realistic menu structures when you're themeing superfish menus.Comment #9
Jeff Burnz commented@8, yes, that could have been the problem, this was on a testing site and I did basically the same thing - just threw a menu together. Interesting.
Comment #10
Countzero commentedHi all.
I can tell Pathclass works with the latest dev version on a vertical menu, except for the "revert after hover on another item" feature (see here for a detailed and hopefuly clear explanation http://drupal.org/node/1068236#comment-4187386).
I'm sure my menu structure is OK. I'm using menu_firstchild for some of my top level items but I don't see how it could affect this behaviour.
FYI, 'active-trail' works for most use cases of pathClass.
Any info on this would be unvaluable for me as I'm on the verge of giving up and coding my own thing, which I don't doubt would be worse than this great module.
Comment #11
peacog commentedThe child menu will always appear expanded when its parent is in the active trail. What this means in practice for most sites is that the first child menu will always be expanded when you're on the home page, because for most websites the home page is the first menu item i.e. the home page is in the active trail so its child menu is expanded.
There's a little CSS trick you can use to make the child menu invisible until such time as you hover over the parent: just add visibility: hidden to the child menu, something like:
The child menu will of course come back and stay there if you hover over the parent menu item, but this can help to keep the site looking tidy when you load the home page.
Comment #12
blischalk commentedI am experiencing this same issue although I am using version 6.x-1.8. When I am visiting a page in the first level of navigation, the list item's ul dropdown menu is automatically expanded without hover. It seems that this issue has something to do with using a "NavBar" menu type versus a "horizontal" menu type.
Using the NavBar menu type and firebugging the li's I noticed that the .sfHover class would be added to an active first level menu list item even without hovering over it.
I also disabled javascript while using the NavBar menu type and the child ul menu still remained expanded. While firebugging the li's with javascript disabled it seems that the first level list item has the class ".active-trail". This class corresponds to the style .sf-navbar .active-trail ul top: 2.5em on line 21 of superfish-navbar.css which triggers the display of the child ul.
After switching the menu type from NavBar to horizontal the problem seems to go away.
Comment #13
mehrpadin commentedBuddies,
So sorry, I forgot this for a long time.
Solution: Block configuration > Set "Path Levels" to 0 :)
(Added to the documentation.)
Update: The option 0 for the Path Level will be available with v1.9-beta3.
Comment #14
mehrpadin commentedComment #15
Shoguo commentedI have this same issue, but it's on any parent link I click in the navigation. All of the children stay open and my path levels goes from 1-10, so I can't set it to 0 through block configuration. Using version 7.x-1.8. Suggestions? I've tried just about all the options in block configuration.
Comment #17
mehrpadin commented