The function needs to be attached to the TabStateChange event for all the tabs.
function ScrollTabToTop(executionObj) {
// retrieve the current tab
var currentTab = executionObj.getEventSource();
// check if the click made the tab to be expanded
if (currentTab.getDisplayState() == "expanded") {
// set the focus to the current tab
currentTab.setFocus();
}
}
Because the function use the Execution Context, is necessary to select the checkbox "Pass execution context as first parameter" when we add the handler:


Like
Report
*This post is locked for comments