Skip to main content
Topic: Buglet of the minor variety: click menu closing. (Read 5721 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Buglet of the minor variety: click menu closing.

Try this. Select click menu option in profile. Open a droppy.

Click somewhere outside the theme wrapper/frame divs (ie: body background).

Menu doesn't close. Just stays there. Click again inside theme wrapper > menu closes.

Had a quick look inside the jQ stuffz but couldn't see anything obvious. Should be tweaked so that clicking anywhere outside the menu closes it, IMO.

I've been using this on my homecooked click menu, which probably isn't directly usable with Superfish but illustrates the point.

Code: [Select]
// Click anywhere else to close.
                $(document).live("click", function(e) {
                    var $clicked = $(e.target);
                    if (! $clicked.parents().is("li.dropmenu"))
                        $("li.dropmenu>ul").css("display","none");
                });

ETA: Also, looking at Superfish, it's using some of the slowest jQ bits to deal with its eye candy (ie: show/hide instead of css("stuff")).
Last Edit: June 09, 2013, 01:20:06 am by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Buglet of the minor variety: click menu closing.

Reply #1

Quote from: Antechinus – ETA: Also, looking at Superfish, it's using some of the slowest jQ bits to deal with its eye candy (ie: show/hide instead of css("stuff")).
https://github.com/emanuele45/Dialogo/commit/97945aaf5f8bc1875c165d162b74528ac0a6c43d#commitcomment-3353881
Bugs creator.
Features destroyer.
Template killer.

Re: Buglet of the minor variety: click menu closing.

Reply #2

Also, As of jQuery 1.7, the .live() method is deprecated. We are on 1.9.1

Re: Buglet of the minor variety: click menu closing.

Reply #3

Fair nuff. Point was the trigger for closing seems to be restricted to areas within the theme wrapper, which seems like a buglet to me. It can just as easily be coded to close the menu if you click anywhere.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Buglet of the minor variety: click menu closing.

Reply #4

Totally agree ... Joel is aware of the issue, its mostly why the click stuff was separated from the hover stuff ... the click (or off click) acted very differently across multiple browsers, tablets, phones, os's   Of course since he did that he has not done any work on the click side of things, I'm sure he will get back to it at some point, if someone else in github land does not do it first.

Re: Buglet of the minor variety: click menu closing.

Reply #5

Uber bump, this is still a thing.
~ SimplePortal Support Team ~

Re: Buglet of the minor variety: click menu closing.

Reply #6

I know, it has not been moved to fixed. :P
Bugs creator.
Features destroyer.
Template killer.

Re: Buglet of the minor variety: click menu closing.

Reply #7

Aye but it's been 3 years, time to look at it  :-[ I don't want the board to end up like the 7 pages of crap there are on smf.
~ SimplePortal Support Team ~

Re: Buglet of the minor variety: click menu closing.

Reply #8

Each bug has a priority, this one is one of the lowest.
The fact that bugs accumulate it's absolutely normal and physiological in any projects (AFAIK it's a well documented pattern), nothing to worry about.
Bugs creator.
Features destroyer.
Template killer.

Re: Buglet of the minor variety: click menu closing.

Reply #9

For anyone who's interested and didn't already know: the reason it was coded this way is because iShiz won't recognise clicky on the body tag. Only works on children of body. If you wanted to sort things so that clicky worked anywhere, you'd need an extra div in the markup that covered the whole screen, with the forum stuffz inside that.

Easy to do. Whether or not it's worth doing is personal preference. Me? I don't care either way.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P