From aa837a47a34552f0b680ddd41366d6522a738090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Fri, 2 Oct 2020 13:22:01 +0000 Subject: [PATCH] [FIX] mail: disable initial scroll position for chatter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit task-2350534 closes odoo/odoo#59024 X-original-commit: 4db7ecd836525357f408359e000a12880a5eab4a Related: odoo/enterprise#13782 Signed-off-by: Alexandre Kühn (aku) Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/models/thread_view/thread_viewer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/mail/static/src/models/thread_view/thread_viewer.js b/addons/mail/static/src/models/thread_view/thread_viewer.js index da546338ca3..3c643339eff 100644 --- a/addons/mail/static/src/models/thread_view/thread_viewer.js +++ b/addons/mail/static/src/models/thread_view/thread_viewer.js @@ -19,6 +19,12 @@ function factory(dependencies) { if (!this.threadCache) { return; } + if (this.chatter) { + // Initial scroll position is disabled for chatter because it is + // too complex to handle correctly and less important + // functionally. + return; + } this.update({ threadCacheInitialScrollPositions: Object.assign({}, this.threadCacheInitialScrollPositions, { [this.threadCache.localId]: scrollTop,