-
-
Notifications
You must be signed in to change notification settings - Fork 335
[Tab] Auto-activate doesn't check siblings, breaks individual tab definitions #1014
Copy link
Copy link
Closed
Labels
lang/javascriptAnything involving JavaScriptAnything involving JavaScripttype/bugAny issue which is a bug or PR which fixes a bugAny issue which is a bug or PR which fixes a bug
Milestone
Description
Bug Report
Steps to reproduce
- Initialise a menu with tabs
- Initialise/modify a single tab in the menu
- Menu now selects the last modified tab as the 'active' tab incorrectly as it fails to check for siblings
Expected result
Individual tab should update without affecting the other tab members in the menu.
Actual result
Last modified tab gets set as the 'active' tab in the menu regardless of actual state.
Testcase
Demonstration:
https://jsfiddle.net/spj408zw/
Proposed solution
Modify line 697 on tab.js from:
$anchor = $allModules.filter('[data-' + metadata.tab + '="' + module.escape.string(tabPath) + '"]')
To:
$anchor = $allModules.siblings().filter('[data-' + metadata.tab + '="' + module.escape.string(tabPath) + '"]')
Worst case scenario, roll back #977 as it introduces issues that were not present before.
Caused by
Version
2.7.8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang/javascriptAnything involving JavaScriptAnything involving JavaScripttype/bugAny issue which is a bug or PR which fixes a bugAny issue which is a bug or PR which fixes a bug