-
-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tab] Make auto activation of tabs optional #1488
[Tab] Make auto activation of tabs optional #1488
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please review again, i enhanced the usage of the new parameter, so you could also provide a string to switch to a defined tab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended to pass autoTabActivations even when null or false?
Yes it's in intented to skip the check if it's null/false. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
The implemented auto activation of tabs when no active tab is found #977 #1025 lead into some situations where a manual set of the active tab does not work anymore and always the last tab was selected.
This especially happens when tabs are initialized separately. Such situations need the old until FUI 2.7.7 which did not check for existing active tabs at all
This PR adds a new option
autoTabActivation
(default true to avoid being a breaking change within the 2.8.x branch)When set to false the behavior is the same as until 2.7.7
When set to a string and no active tab exists, it will use that string as the path name for the tab to be activated.
Testcase
The third tab is supposed to be active
Broken
The last initiated tab is selected
https://jsfiddle.net/z632cfq5
Fixed
The previous selected tab stays selected
https://jsfiddle.net/z632cfq5/1/
Closes
#1255
#1188
atk4/ui#1044