Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions js/cwd_popups.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,17 @@ jQuery(document).ready(function($) {
//popups(); // process the page

/* Data Storage Tool: Delay popups init until the table is rendered by app.js */
var popup_ran_once = false;
$('#comparisonchart').on('DOMSubtreeModified', function(){
if (!popup_ran_once) {
popups();
popup_ran_once = true;
function waitForChart() {
var interval = setInterval(() => {
var element = document.querySelector('#comparisonchart');
if (element.hasChildNodes()) {
clearInterval(interval);
popups();
}
}, 100);
}
});

waitForChart();

/* -----------------------------------------------------------------------------------------
Generate Popup Controls
Expand Down