User login

Nice Menus drop down bug

A good, simple module for Drupal called Nice Menus has an annoying bug (supposedly not on all themes, but certainly on most of them): It frequently loses the focus when the mouse moves from the top-level menu to a child menu, causing the drop-down menu to disappear as the user goes to click on it.

Very annoying. (If you click and hold and move the mouse down, the second-level menu stays and you can then click on it. Not exactly a solution you can ask your users to do.)

The fix can vary depending on the site. For instance, the first fix listed below worked on Agaric Design's site here, but all the way to the third fix was needed for a client. In any case, the surest fixes seem to be moving pixels around until there's a consistent overlap (visually indistinguishable from normal behavior).

<p>/* bmm hack fix per http://drupal.org/node/67160 */</p>

<p>ul.nice-menu li ul li {
margin-top:-5px;
margin-bottom:4px;
}</p>

<p>/* Further bmm hack per Nice_Menus own README */</p>

<p>.block-nice_menus {position: relative;}</p>

<p>/* My own bmm hack per my ingenius mind */</p><p>ul.nice-menu li a, ul.nice-menu-down li a { padding-bottom: 6px; }</p>

A good, simple module for Drupal called Nice Menus has an annoying bug (supposedly not on all themes, but certainly on most of them): It frequently loses the focus when the mouse moves from the top-level menu to a child menu, causing the drop-down menu to disappear as the user goes to click on it.

Very annoying. (If you click and hold and move the mouse down, the second-level menu stays and you can then click on it. Not exactly a solution you can ask your users to do.)

The fix can vary depending on the site. For instance, the first fix listed below worked on Agaric Design's site here, but all the way to the third fix was needed for a client. In any case, the surest fixes seem to be moving pixels around until there's a consistent overlap (visually indistinguishable from normal behavior).

<p>/* bmm hack fix per http://drupal.org/node/67160 */</p>

<p>ul.nice-menu li ul li {
margin-top:-5px;
margin-bottom:4px;
}</p>

<p>/* Further bmm hack per Nice_Menus own README */</p>

<p>.block-nice_menus {position: relative;}</p>

<p>/* My own bmm hack per my ingenius mind */</p><p>ul.nice-menu li a, ul.nice-menu-down li a { padding-bottom: 6px; }</p>

Comments

Solved Issue for Me

Thanks a million Benjamin, solution 3 resolved the issue I was experiencing on our site.

Perfect.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.