-
Dave Warfel
Using the Tabs block, I have 5 tabs set up. When the page loads, all five tab menu items are being given the
.gb-block-is-currentclass, which means they are all styled as if they are the current/active tab.This resets and works properly as soon as you click on any other tab beside the first one.
NOTE: I did rename the HTML ID for each tab item container so that I could use easy to remember hashes in the URL to link directly to a tab. I saw those had dynamically inserted IDs by default, so I’m not sure if doing this messed something up.
Including live site in private info.
-
Hi Dave,
That’s odd. Do you happen to have any custom functions that could be causing this behavior? If not, try deactivating all plugins except GP Premium, GB, and GB Pro to see if it’s a plugin conflict.
Regarding the HTML ID – there should be no issue changing the default IDs as long as each one is unique.
-
Dave Warfel
Thanks for confirming HTML IDs 👍
I deactivated all plugins except those 3 and the issue persists. All my custom functions were in the FluentSnippets plugin, which I deactivated.
It’s interesting that the
aria-selectedattribute is set tofalseon all but the first tab, which appears to be correct. So that part is working. But what is telling it to add the.gb-block-is-currentclass?Here’s a screenshot just for reference.
-
When you added more tab items, did you duplicate the existing tab item or did you use the specific Add tab item button?
If you used the duplicate method, then your tab structure is broken, you will need to rebuild the tabs and use the proper way to add tab items.
-
Dave Warfel
I duplicated them. That was the issue. I recreated tab items 2-5 using the “add tab item” button and that fixed it. Thanks Ying!
-
Glad to hear that 🙂
- You must be logged in to reply to this topic.