lib/DockTabBar.js
/**
 * @return returns true if navigation is handled in local tab move, otherwise returns false
 */
@return returns true if navigation is handled in local tab move, otherwise returns false
@return returns true if navigation is handled in local tab move otherwise returns false
function checkLocalTabMove(key, tabbar) {
    if (key === 'ArrowLeft' || key === 'ArrowRight') {
        let tabs = Array.from(tabbar.querySelectorAll('.dock-tab-btn'));
        let activeTab = tabbar.querySelector('.dock-tab-active>.dock-tab-btn');
        let i = tabs.indexOf(activeTab);
        if (i >= 0) {
            if (key === 'ArrowLeft') {
                if (i > 0) {
                    tabs[i - 1].click();
                    tabs[i - 1].focus();
                    return true;
                }
            }
            else {
                if (i < tabs.length - 1) {
                    tabs[i + 1].click();
                    tabs[i + 1].focus();
                    return true;
                }
            }
        }
    }
    return false;
}
function checkLocalTabMove ( key , tabbar ) { if ( key === 'ArrowLeft' || key === 'ArrowRight' ) { let tabs = Array . from ( tabbar . querySelectorAll ( '.dock-tab-btn' ) ) ; let activeTab = tabbar . querySelector ( '.dock-tab-active>.dock-tab-btn' ) ; let i = tabs . indexOf ( activeTab ) ; if ( i >= 0 ) { if ( key === 'ArrowLeft' ) { if ( i > 0 ) { tabs [ i - 1 ] . click ( ) ; tabs [ i - 1 ] . focus ( ) ; return true ; } } else { if ( i < tabs . length - 1 ) { tabs [ i + 1 ] . click ( ) ; tabs [ i + 1 ] . focus ( ) ; return true ; } } } } return false ; }
@return returns true if navigation is handled in local tab move, otherwise returns false
@return returns true if navigation is handled in local tab move otherwise returns false