I tried to use the supposition plugin because I have some very large submenues. But I get a vertical offset of the submenue (see screenshot). I used the space [blue] style.
I know the plugin is beta, but it would be very useful. So any possibility to get this fixed?
Thanks for your help.
grossmann-mcs

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mehrpadin’s picture

Servus,

I see, it's that the child menu - like all the other child menus - has top: 0;, I guess bottom: 0; can somehow help us here, but need to test it; will add it to my to-do list so it'll be diffidently fixed in the next version, vielen dank :)

grossmann’s picture

Hello,
thanks for your hint here. I tried around and found a solution - see comments (sorry I tagged this as php code which it isn't, it's javascript, but it gives a nicer syntax highlighting).

        var windowHeight = $w.height(),
        offsetTop = $u.offset().top,
        menuParentHeight = $u.parent().outerHeight(true),
        menuHeight = $u.height(),
        menuPadding = $(this).css("paddingBottom"), // get paddingBottom for positioning
        baseline = windowHeight + _offset('y');
        var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight));
        if (expandUp) {
          $u.css('bottom', '-' + menuPadding); // substracts the paddingBottom for alignment
          // $u.css('bottom', menuParentHeight + 'px');
          $u.css('top', 'auto');
        }

As you see I defined bottom not with menuParentHeight but instead I get the paddingBottom value and substract it from bottom to align it with the parent.
Maybe this is a help for your solution. I didn't test it with other setting of superfish so this may not work as a general solution.
I hope this helps.
Bitte schön ;-)
grossmann-mcs

mehrpadin’s picture

Status: Active » Fixed

Oh forgot this issue! fixed some time ago (development release with the master branch of the library)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mibfire’s picture

Issue summary: View changes
Priority: Normal » Major
Status: Closed (fixed) » Active

$u.css('top', 'auto'); wont be removed after mouseout, so the submenu will be visible, instead of hidden with top: -99999em;!!!

mibfire’s picture

in superfish.js

This

    hideSuperfishUl : function(){
      var o = sf.op,
        not = (o.retainPath===true) ? o.$path : '';
      o.retainPath = false;
      var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
          .find('>ul').addClass('sf-hidden');
          
      o.onHide.call($ul);
      return this;
    },

should be

  $.fn.extend({
    hideSuperfishUl : function(){
      var o = sf.op,
        not = (o.retainPath===true) ? o.$path : '';
      o.retainPath = false;
      var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
          .find('>ul').addClass('sf-hidden').css('top', '');

      o.onHide.call($ul);
      return this;
    },
Honza Pobořil’s picture

How is it going?

Issue is also at your demo page.

Honza Pobořil’s picture

Version: 7.x-1.8 » 7.x-1.x-dev

Updated to module dev and latest library for D7, still broken.

LOBsTerr’s picture

Status: Active » Closed (outdated)