From 5cd5f9a595c6e30ba13df145d25e49ddbd4c75a5 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Sun, 3 Dec 2023 21:50:43 +0100 Subject: [PATCH] No issue: Optimize tracking be excluding elements that contain no text --- .../inception-js-api/src/main/ts/src/util/ViewportTracker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts b/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts index 0a7d3434ada..9701f78d998 100644 --- a/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts +++ b/inception/inception-js-api/src/main/ts/src/util/ViewportTracker.ts @@ -77,6 +77,10 @@ export class ViewportTracker { return false } + if (!element.textContent) { + return false; + } + return style.display === 'block' || style.display === 'flex' || style.display === 'grid' || style.display === 'table-row'