diff --git a/www/ftui/components/chart/chart-data.component.js b/www/ftui/components/chart/chart-data.component.js index 82f64da8..c9d7a4d2 100755 --- a/www/ftui/components/chart/chart-data.component.js +++ b/www/ftui/components/chart/chart-data.component.js @@ -64,7 +64,9 @@ export class FtuiChartData extends FtuiElement { fetch() { if (!this.isLoading) { - this.fetchLogItems(this.log, this.file, this.spec); + if (ftuiHelper.isVisible(this)){ + this.fetchLogItems(this.log, this.file, this.spec); + } } } diff --git a/www/ftui/modules/ftui/ftui.helper.js b/www/ftui/modules/ftui/ftui.helper.js index ccc8d065..3182dad3 100755 --- a/www/ftui/modules/ftui/ftui.helper.js +++ b/www/ftui/modules/ftui/ftui.helper.js @@ -160,7 +160,13 @@ export function isAppVisible() { } export function isVisible(element) { - return (element.offsetParent !== null); + const pop_parent = element.closest('ftui-popup'); + if (pop_parent){ + return (pop_parent.offsetParent !== null); + } else { + return (element.offsetParent !== null); + } + } export function isDefined(value) {