Skip to content

fix: whiteboard reopening when toggling lobby after hiding whiteboard#17105

Open
vishal2005025 wants to merge 1 commit intojitsi:masterfrom
vishal2005025:fix/whiteboard-lobby-reopen
Open

fix: whiteboard reopening when toggling lobby after hiding whiteboard#17105
vishal2005025 wants to merge 1 commit intojitsi:masterfrom
vishal2005025:fix/whiteboard-lobby-reopen

Conversation

@vishal2005025
Copy link
Contributor

Summary

This PR fixes an issue where the whiteboard could reopen in the background after being hidden, when the moderator later toggled Lobby from Security options.

Problem

After the sequence:

  1. Open Security and toggle Lobby (works),
  2. Show Whiteboard, then hide Whiteboard (works),
  3. Reopen Security and toggle Lobby,

the whiteboard reopened unexpectedly, even though the lobby action is unrelated.

Root Cause

Whiteboard middleware was reopening whiteboard on conference metadata updates whenever whiteboard metadata existed, even when that metadata was not new.
Lobby toggling can trigger metadata updates, which unintentionally retriggered whiteboard open.

Changed

Updated react/features/whiteboard/middleware.any.ts so whiteboard auto-open runs only when whiteboard collaboration details are new/changed (roomId/roomKey changed), instead of on every metadata refresh.

Before fix

before-lobby.mp4

After fix

after-lobby.mp4

Note:

This issue is reproducible on meet.jit.si

@vishal2005025
Copy link
Contributor Author

@saghul @damencho @jallamsetty1 Please take a look and let me know if any changes are required.
Thanks!

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

if (metadata?.[WHITEBOARD_ID]) {
const existingCollabDetails = getCollabDetails(state);
const { collabDetails } = metadata[WHITEBOARD_ID];
const hasNewCollabDetails = existingCollabDetails?.roomId !== collabDetails?.roomId
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case we ever introduce new stuff, use lodash's "equal" helper.

@vishal2005025 vishal2005025 force-pushed the fix/whiteboard-lobby-reopen branch from 7d99e56 to ececd44 Compare March 7, 2026 06:37
@vishal2005025
Copy link
Contributor Author

@saghul Thanks for the review - I’ve updated the comparison to use lodash-es/isEqual so the comparison remains reliable if collabDetails evolves.
The behavior remains unchanged: it prevents the whiteboard from reopening on unrelated metadata updates while still allowing it when the details actually change.
Please take a look.

@vishal2005025 vishal2005025 requested a review from saghul March 7, 2026 06:51
@vishal2005025
Copy link
Contributor Author

vishal2005025 commented Mar 7, 2026

@saghul The same issue also exists on Android, so this fix should cover Android as well.

Ci jobs: https://github.com/vishal2005025/jitsi-meet/actions/runs/22794105721

@vishal2005025 vishal2005025 force-pushed the fix/whiteboard-lobby-reopen branch from ececd44 to 067250c Compare March 12, 2026 14:35
@vishal2005025
Copy link
Contributor Author

@saghul @damencho @jallamsetty1 I noticed the same issue where after opening and hiding the whiteboard in a breakout room, leaving the breakout room could reopen it in the background. This happens because the room transition triggers a metadata refresh that is interpreted as a new whiteboard session.

I fixed this by adding a small room-switch guard in the shared whiteboard middleware so the first metadata-driven auto-open is skipped during breakout room transitions.

The previous behavior remains unchanged, and both issues are now resolved and working as expected.

Please take a look.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants