Javascript conflicts

Hey community,

This is a followup to this question.

So the current jira build will not load javascript through requireResource on components describing an issue in the issue search. The solution to this would be to place the javascript files into the atl.general context, ensuring they’re loaded every single page.

In my case however, this causes errors on the JIRA.ViewIssueTabs.onTabReady() function. This one is required to ensure that the js functions attach correctly to the html.
The issue it causes is that on other pages, the dropdowns at the top (projects, issues) no longer display correctly, rendering them inaccessible.

Is there anyone who has experience with a similar case?

2 Likes

Alright, found something that solves the problem, with thanks to this post and adding some timeouts to the functions, I’ve gotten a replacement for onTabReady without breaking anything.

        JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context, reason){
            if(reason == JIRA.CONTENT_ADDED_REASON.pageLoad){
                setTimeout(function(){
                actionButtons();
                accordion();
                }, 3000);
            }else if(reason == JIRA.CONTENT_ADDED_REASON.panelRefreshed){
                setTimeout(function(){
                actionButtons();
                accordion();
                }, 3000);
            }
        });
2 Likes