From 9060bf944650f6212923dc66f3eb8bfcce1f2034 Mon Sep 17 00:00:00 2001 From: Melissa Gore <649983+melissagore@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:33:07 -0800 Subject: [PATCH] replace browser removed js with setinterval --- js/cwd_popups.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/js/cwd_popups.js b/js/cwd_popups.js index dde3f7c..02a60dc 100644 --- a/js/cwd_popups.js +++ b/js/cwd_popups.js @@ -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