Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(toolbox): limit tile-overlap check to the bottom row

Harshit Singh Parihar43d7ea4311a3
diff --git a/react/features/toolbox/subscriber.web.ts b/react/features/toolbox/subscriber.web.ts
index fe6834eddd..581e2f6d5c 100644
--- a/react/features/toolbox/subscriber.web.ts
+++ b/react/features/toolbox/subscriber.web.ts
@@ -28,7 +28,7 @@ const checkToolboxOverlap = (clientHeight: number, store: IStore) => {
if (!toolboxRect) {
return;
}
- const tiles = document.querySelectorAll('span.videocontainer');
+ const tiles = document.querySelectorAll<HTMLSpanElement>('span.videocontainer');
if (!tiles.length) {
return;
@@ -50,8 +50,9 @@ const checkToolboxOverlap = (clientHeight: number, store: IStore) => {
const rows = store.getState()['features/filmstrip'].tileViewDimensions?.gridDimensions?.rows;
const noOfTilesToCheck = rows === 1 ? tiles.length : DEFAULT_MAX_COLUMNS - 1;
+ const limit = Math.min(noOfTilesToCheck, tiles.length);
- for (let i = 1; i < Math.max(noOfTilesToCheck, tiles.length); i++) {
+ for (let i = 1; i <= limit; i++) {
const tile = tiles[tiles.length - i];
const indicatorsRect = tile?.querySelector('.bottom-indicators')?.getBoundingClientRect();