KamoCRM

Use ref for memberPanelOpen in openChat to prevent stale closure

Fixkamo-internal
Shipped
11 மார்ச், 2026 அன்று 12:21 AM UTC
Author
kamo
Commit
b380a54

When a user opens the member panel, clicks a member to chat, then closes the panel before the async session API call returns, the chat window was positioned with a 500px offset as if the panel were still open. This happened because openChat captured memberPanelOpen via closure at call time. Using a ref ensures the current panel state is read after the await.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing