clicking on a primary tab makes active menu item inactive

screenshot attached.

CommentFileSizeAuthor
clicking_tab_menu_item_inac.gif23.03 KBerikhopp

Comments

jo1ene’s picture

Priority: Normal » Minor

I'm not sure I understand this one. What I saw when playing with it is this: When you click on "my account" you're directed to the view tab and the "my account" link is styled as active. Once you click the edit tab, the "my account" link is no longer styled as active. Is this you're referring to?

This isn't really a bug, but a styling issue. Is there a way to keep the "my account" link (in this case) styled as active no matter what tab you're on? This seems pretty minor to me either way.

Bèr Kessels’s picture

Category: bug » support

You are mixing up the classes. .active is for the ACTIVE menu item. .expanded is for the one you want!
if this helps, please close the issue.

jo1ene’s picture

Category: support » bug

I don't think that the CSS class name is the issue. And the menu items in question are assigned the .active class by Drupal, which is what I expected. It wouldn't be .expaned because they are not expandable menu items. Did you look at the screenshot? It happens for links like "my account" as in the screenshot, or in custom menu items created by the menu module like in my tests. They are single links, no tree structure.

The problem is when you switch tabs, even though you're working with the same node or admin page, the link is not not given the .active class anymore. If it should be .expanded, then that needs to be fixed in the code. There's no stylesheet solution if the classes aren't assigned properly by Drupal or the Menu module or whatever.

Drupal is doing something, not really "wrong" just a little inconsistent. Like I said, it's not a real problem, just a window-dressing issue.

Bèr Kessels’s picture

Version: 4.6.0 » x.y.z
Priority: Minor » Normal

I now see what you mean. Seeting this to HEAD, for that is where it can/should be fixed.

Ber

Richard Archer’s picture

The active style is only applied to the current node.

If you click 'create content' it gets highlighted.
If you then click 'page', 'create content' is no longer highlighted.

The same thing is happening with 'my account' except it has no visible children.

I'm inclined to 'by design' this.

jo1ene’s picture

I would not argue with setting this to "by design" but I can also sympathize with the original poster.

The analogy of clicking create content > page IS NOT what is being discussed. If you click create content, create content is current and is highlighted. (Let's just use this word for now.) When you go to page, page is now current and is highlighted as expected. This is OK.

What we ARE talking about is when you click my account, it is current and is highlighted. OK. When you click the edit TAB, NOT another node or menu item, YOU'RE STILL ON MY ACCOUNT and some would expect it TO STILL BE HIGHLIGHTED.

Further, If you go to a node AND CLICK A TAB, your STILL ON THAT NODE and SOME would expect it to STILL be highlighted. As it stands now, If I go to the node with menu item "Foo" - foo is highlighted. ONCE I CLICK ON THE EDIT TAB, I'M STILL WORKING WITH FOO and some folks think it should still be highlighted. But it isn't.

Again - not important. But something to think about.

marcoBauli’s picture

Actually the problem seems to be the menu system handling ONLY 1 "active" menu item at a time.

This issue does not happen only for tabs (as stated originally above), but for every link, sub-section or secondary link.

An issue about this has been filed here.

magico’s picture

Status: Active » Closed (duplicate)

As stated, this is duplicate.