flexnav icon indicating copy to clipboard operation
flexnav copied to clipboard

on resize window fix

Open guillermofr opened this issue 12 years ago • 8 comments

mouseenter and mouseleave events, has a bug when window resizes

you need a fix, i put

$('.item-with-ul').unbind('mouseenter').unbind('mouseleave');

on line 102 of jquery.flexnav.js

100   });
101       } else if (settings.hoverIntent === false) {
102          $('.item-with-ul').unbind('mouseenter').unbind('mouseleave');
103          return $('.item-with-ul').on('mouseenter', showMenu).on('mouseleave', resetMenu);
104        }

guillermofr avatar Feb 05 '14 09:02 guillermofr

Thanks!

NielsLust avatar Feb 18 '14 09:02 NielsLust

I tested this fix and it solved the same issue for me. Thanks!

danny-englander avatar Mar 01 '14 23:03 danny-englander

thanks a lot!!!

danielsmacedo avatar Mar 21 '14 17:03 danielsmacedo

I'm having the problem when after opening a submenu item on small screens and then resize it back to desktop size the submenu I opened in the small screen remains open in desktop view.

I've tried adding the fix above but the problem remains.

Is there any other fix I could try?

Thanks

Wayne.

DesignWorkshop avatar May 29 '14 11:05 DesignWorkshop

hi, you can avoid that problem simply adding this line to js

line 75 on resize event

75  resizer = function() {
76       $('.item-with-ul').find('ul').removeClass('flexnav-show').css('display','none');  // <--- this line

update: no need to add the full line, just adding .css('display','none'); on line 94 works aswell

92  92              $nav.removeClass('flexnav-show').find('.item-with-ul').on();
93      -           $('.item-with-ul').find('ul').removeClass('flexnav-show');
    93  +           $('.item-with-ul').find('ul').removeClass('flexnav-show').css('display','none');
94  94              resetMenu();

guillermofr avatar May 29 '14 11:05 guillermofr

Thanks,

I added the code where you suggested, this however hid the sub menu whenever the browser resized. I looked and added to line 89 so that it only hides the sub nav when the screen is made larger than the breakpoint.

88 } else if ($(window).width() > breakpoint) { 89 $('.item-with-ul').find('ul').removeClass('flexnav-show').css('display','none');

Thanks again

Wayne.

DesignWorkshop avatar May 29 '14 12:05 DesignWorkshop

What is about to provide a pull requests? I have seen many addtional code in other issues that fix various problems, but nobody sent pull requests. Are they not accepted?

ova2 avatar Dec 03 '14 12:12 ova2

Very confusing.. Dunno if what's posted here in this conversation is the solution to the issue or the TWO pull requests (#160 & #167) apparently addressing this issue.. (neither PR has been accepted) Seems like this issue has been reported back at least 12 months..

DivaVocals avatar Jan 21 '15 18:01 DivaVocals