in src/components/UncontrolledTabs.js [346:362]
function isTabFromContainer(node) {
// return immediately if the clicked element is not a Tab.
if (!isTabNode(node)) {
return false;
}
// Check if the first occurrence of a Tabs container is `this` one.
let nodeAncestor = node.parentElement;
do {
if (nodeAncestor === ref.current) return true;
if (nodeAncestor.getAttribute('data-rttabs')) break;
nodeAncestor = nodeAncestor.parentElement;
} while (nodeAncestor);
return false;
}