Skip to main content
Topic: [RC1] click menu instead of hover menu = no home link (Read 5435 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[RC1] click menu instead of hover menu = no home link

If a user choose to use a click menu instead of hover menu, there's no link to the forum index named "community". Would be better if there is one.

Re: [RC1] click menu instead of hover menu = no home link

Reply #1

I noticed that as well several weeks ago and thought it functioned that way by design. In order to see the menu under Community you would need to click it ( if click is enabled ), thus no way to do the linky thing when the hover option is used.

Perhaps put a 'Home' button on the menu bar when click is selected or place it on the Community drop down menu along with the other options?

Re: [RC1] click menu instead of hover menu = no home link

Reply #2

http://www.elkarte.net/community/index.php?topic=1627.0

It is a bit tricky, honestly.
Yes, it's a bit counter-intuitive, but I'm not really sure what the best way to fix it.
Bugs creator.
Features destroyer.
Template killer.

Re: [RC1] click menu instead of hover menu = no home link

Reply #3

We could add those links in the dropdown when using click to navigate ... so add community as an option when the dropdown appears only for click menus (could also give a different name like home, index, forum, main ??) ...

Its the same thing with the profile button which normally links to summary, but with click you have to select another option and then navigate back.  So for a click menu we could add in summary as one of the dropdown options ...

Re: [RC1] click menu instead of hover menu = no home link

Reply #4

hmm... wasn't the menu at some point changed to toggle between hover/click depending on the screen resolution? (Asking because it doesn't now so either my memory is failing badly or there is a bug. :P)
Bugs creator.
Features destroyer.
Template killer.

Re: [RC1] click menu instead of hover menu = no home link

Reply #5

Hummm Yes it will (or should) "auto" swap for small screens, or at least devices that browser detect says is mobile,

Not sure it would do it if your using a responsive design view though.

Re: [RC1] click menu instead of hover menu = no home link

Reply #6

So? What are you planning to do?  O:-)

Re: [RC1] click menu instead of hover menu = no home link

Reply #7

Taskmaster  :P

Really the only think I can think of is to add the additional sub button that mimics the top menu button action.  We can use the 'show' setting based on if the user has click enabled (or if the system set it) to add the menu. 

So under community we need "home", under My Messages we need "inbox" under profile we need "summary"   I think that would work?

Maybe there is a way to add a double click action for the top menu, one click to open (if it can open) and two to execute the top button, but that's not so intuitive.

Re: [RC1] click menu instead of hover menu = no home link

Reply #8

I was thinking about the second click (just because it's the way xenforo deals with it), though I find it a bit annoying.
It should be enough to "tweak" a preventDefault somewhere I think.
Bugs creator.
Features destroyer.
Template killer.

Re: [RC1] click menu instead of hover menu = no home link

Reply #9

I added a double click option to those links  ... so basically LI's with UL's, should check for links as well but ... You can go to the old test site http://elkarte.spudsdesign.com/community and enable click menus to see what it does.

Now the negatives:
1) The click event also fires on the double click.  This means you run a chance of when doing a double click the drop menu appears (but the link will be followed, this is just a visual annoyance).    There is no great way to fix that that I could find.  The only thing I tried was to a delay to the single click event to prevent its action until we were sure it was not a double click.  Of course that slows the click event,  so if you make it to long it seems unresponsive, to short and the menu appears anyway.  Maybe @Joker™ has some ideas
2) double clicking in some mobile browsers means zoom, so I'm not sure what will happen in those cases / browsers.


Re: [RC1] click menu instead of hover menu = no home link

Reply #10

Quote from: Spuds – I added a double click option to those links  ... so basically LI's with UL's, should check for links as well but ... You can go to the old test site http://elkarte.spudsdesign.com/community and enable click menus to see what it does.

Now the negatives:
1) The click event also fires on the double click.  This means you run a chance of when doing a double click the drop menu appears (but the link will be followed, this is just a visual annoyance).    There is no great way to fix that that I could find.  The only thing I tried was to a delay to the single click event to prevent its action until we were sure it was not a double click.  Of course that slows the click event,  so if you make it to long it seems unresponsive, to short and the menu appears anyway.  Maybe @Joker™ has some ideas
2) double clicking in some mobile browsers means zoom, so I'm not sure what will happen in those cases / browsers.


Sorry to make a booboo, but what exactly are we talking about??

Re: [RC1] click menu instead of hover menu = no home link

Reply #11

LOL ... thats because it was a shameless cry for help !

Background: The menu system in ElkArte can use either hover dropdowns or click dropdowns.   For that we use either superfish or superclick instead of plain css  ... this to provide some a11y features.  Anyway on the top menu, items like Admin & Community,  are also navigation links.  So if you click those top menu items it is a standard navigation link, hover instead you get the dropdown.

Now when you instead use click dropdowns, that navigation click is intercepted and the dropdown created on the click and there was no way to activate/follow the top navigation link.  So to work around this issue I added a dblclick option on those menus, so a single click on Admin shows the dropdown, but a double click on Admin navigates to the admin section.

The issue then is what I posted about, when you doubleclick the single click event still fires so you may get the single click activity, which in this case is the menu to appears or starts to appear even though its a double click event.    ... I could not find a way to prevent that other than adding a delay function on the single click to wait and see if another click arrives in some short period of time and if not fall through.  That kind of worked but you are guessing at whats a good double click time and during that wait the system is ... well waiting (50ms 100ms 200ms) ... so no sure that "solution" was better than the problem.

Re: [RC1] click menu instead of hover menu = no home link

Reply #12

Quote from: Spuds – LOL ... thats because it was a shameless cry for help !
Lol


Quote from: Spuds – Now when you instead use click dropdowns, that navigation click is intercepted and the dropdown created on the click and there was no way to activate/follow the top navigation link.  So to work around this issue I added a dblclick option on those menus, so a single click on Admin shows the dropdown, but a double click on Admin navigates to the admin section.

The issue then is what I posted about, when you doubleclick the single click event still fires so you may get the single click activity, which in this case is the menu to appears or starts to appear even though its a double click event.    ... I could not find a way to prevent that other than adding a delay function on the single click to wait and see if another click arrives in some short period of time and if not fall through.  That kind of worked but you are guessing at whats a good double click time and during that wait the system is ... well waiting (50ms 100ms 200ms) ... so no sure that "solution" was better than the problem.
I think we can place a check inside the click function

- On click on main menu item
  |- if concerned sub menu is open visible, open it
  |- if concerned sub menu is visible, navigate to the link
  |- if click anywhere else hide the menu
Last Edit: July 20, 2014, 10:46:18 am by Joker™

Re: [RC1] click menu instead of hover menu = no home link

Reply #13

It may be something like this:
Code: [Select]
				if ($popUp.length) {
if (!$popUp.is(':hidden'))
return true;
func = ($popUp.is(':hidden')) ? over : out;
$.proxy(func, $this.parent('li'))();
return false;
}
in clickHandler.
That means when the popup menu is visible, then the top-level link is followed instead of closing the menu.
It works that way in other software.
Neither in favour or against.
Bugs creator.
Features destroyer.
Template killer.

Re: [RC1] click menu instead of hover menu = no home link

Reply #14

So that would replace the dblclick workaround that is in place now or supplements it? 

If it works better I'm all for it.  What we have now has the issue I described, you can double click on home, admin, profile etc and be taken there, but the dropdown menu will appear for the instance between clicks.  The only way I could work around that was with a delay and I did not want to do that.

So where would the code above go?