details:   https://code.tryton.org/tryton/commit/d152651e2567
branch:    7.6
user:      Cédric Krier <[email protected]>
date:      Wed Mar 18 17:18:42 2026 +0100
description:
        Clear _chat attribute and unregister when closing chat or tab

        Closes #14576
        (grafted from e6004c09cc94ef5eb082a74491664b4b2ba21c97)
diffstat:

 sao/src/tab.js |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r d23bdbbc124c -r d152651e2567 sao/src/tab.js
--- a/sao/src/tab.js    Sun Mar 29 22:31:44 2026 +0200
+++ b/sao/src/tab.js    Wed Mar 18 17:18:42 2026 +0100
@@ -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);

Reply via email to