<commit_before>function showChangesetByFork(node, repoId, repoName, repoUrl) {


    // hide all changesets CommitPanels
    AJS.$('#' + node + ' .CommitPanel').each(function(n, el) {
        $(el).hide();
    });

    // show only that which is from given repository
    AJS.$('#' + node + "-" + repoId).show();
    
    registerForksTooltip(node, repoName, repoUrl);
}

function registerForksTooltip(node, repoName, repoUrl) {
	registerInlineDialogTooltip(AJS.$("#fork-drop-down-"+node), "This changeset is present in multiple repositories (forks). Currently showing <a href='"+repoUrl+"' target='_blank'>" + repoName + "</a>.");
}

function registerInlineDialogTooltip(element, body) {
    return AJS.InlineDialog(AJS.$(element), "tooltip_"+AJS.$(element).attr('id'),
            function(content, trigger, showPopup) {
                content.css({"padding":"10px"}).html(body);
                showPopup();
                return false;
            },
            {onHover:true, hideDelay:200, showDelay:1000, arrowOffsetX:-8, offsetX:-80}
        );
}
<commit_msg>BBC-539 Preventing drop down button to get active if tooltip is shown<commit_after>function showChangesetByFork(node, repoId, repoName, repoUrl) {


    // hide all changesets CommitPanels
    AJS.$('#' + node + ' .CommitPanel').each(function(n, el) {
        $(el).hide();
    });

    // show only that which is from given repository
    AJS.$('#' + node + "-" + repoId).show();
    
    registerForksTooltip(node, repoName, repoUrl);
}

function registerForksTooltip(node, repoName, repoUrl) {
	registerInlineDialogTooltip(AJS.$("#fork-drop-down-"+node), "This changeset is present in multiple repositories (forks). Currently showing <a href='"+repoUrl+"' target='_blank'>" + repoName + "</a>.");
}

function registerInlineDialogTooltip(element, body) {
    return AJS.InlineDialog(AJS.$(element), "tooltip_"+AJS.$(element).attr('id'),
            function(content, trigger, showPopup) {
                content.css({"padding":"10px"}).html(body);
                showPopup();
                return false;
            },
            {onHover:true, hideDelay:200, showDelay:1000, arrowOffsetX:-8, offsetX:-80, addActiveClass:false}
        );
}

{'fraction_non_alphanumeric': 0.15523306948109059, 'fraction_numerical': 0.011873350923482849, 'mean_word_length': 2.9496527777777777, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '536004', 'n_tokens_mistral': 718, 'n_tokens_neox': 682, 'n_words': 144}