From 17d7a1ad22483a129d055b432ca6674745ff8e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 18 Mar 2026 17:18:42 +0100 Subject: [PATCH] Clear _chat attribute and unregister when closing chat or tab Closes #14576 --- sao/src/tab.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sao/src/tab.js b/sao/src/tab.js index df6d883cb8..2b0d684bb1 100644 --- a/sao/src/tab.js +++ b/sao/src/tab.js @@ -141,6 +141,8 @@ if (this.info_bar) { this.el.append(this.info_bar.el); } + + this._chat = null; }, set_menu: function(menu) { var previous; @@ -350,6 +352,9 @@ tabs.trigger('ready'); if (this._chat) { this._chat.unregister(); + let chat = this.sidebar_content.find('.chat'); + chat.remove(); + this._chat = null; } }); }, @@ -1409,6 +1414,8 @@ let chat = this.sidebar_content.find('.chat'); if (chat.length) { chat.remove(); + this._chat.unregister() + this._chat = null; } else { if (this.screen.current_reference) { this._chat = new Sao.Chat(this.screen.current_reference);