summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/model_field_selector.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2019-08-09 10:53:36 +0000
committerAlexandre Kühn <aku@odoo.com>2019-08-12 08:31:15 +0000
commita72b23f6b5fbcf637d5de16f9f05ba00552cc186 (patch)
tree7282014e40e9faff8b07a6cdce8da52a80e4523b /addons/web/static/src/js/widgets/model_field_selector.js
parent452a4497c1abe316314f794e5299bb976e3104f4 (diff)
[FIX] mail: register thread window after append in DOM
Before this commit, we may have the following error: `TypeError: Cannot read property 'html' of undefined` This happened in the following scenario: Terminology: - in multi-tab environment, there is a master tab and slave tabs - master tab fetches notifications from the server and forwards them to slave tabs State: - 2 logged-in users: Michell & Marc - Mitchell has open 2 browser tabs - Mitchell has a pinned private conversation with Marc Steps: - Mitchell has focus on a slave tab - Marc posts several messages to Mitchell in very quick succession => Mitchell gets crash error above. This issue is caused by chat window being registered in mail manager while it has not been mounted to DOM. On receiving 2nd new message, it has to re-render chat window header in order to update displayed unread counter. However, this fails due to chat window having no DOM node yet. This commit solves the issue by mounting chat window to DOM before being registered in mail manager. That way, on receiving 2nd new message, it does not trigger a re-render on chat window that is about to be mounted to DOM, since it has not been registered yet. Note that the displayed unread counter will be correct, because it uses the up-to-date unread counter on mount. Task-ID 2050108 closes odoo/odoo#35601 Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/widgets/model_field_selector.js')
0 files changed, 0 insertions, 0 deletions