diff options
| author | Xavier Dubuc <xdu@odoo.com> | 2020-06-26 12:12:17 +0000 |
|---|---|---|
| committer | Xavier Dubuc <xdu@odoo.com> | 2020-07-07 15:57:46 +0000 |
| commit | 7091ad53e9f363b24a742c200841f7ed8a6e4674 (patch) | |
| tree | 1a67c8edcb3d40d33e05b7bde792436b3301afa1 /addons/mail/static/src/components/thread_viewer/thread_viewer.js | |
| parent | ecefd51b63ed8c933243b4a2d26381d05ac288d2 (diff) | |
[FIX] mail: save scroll position of chat window when folded
- Remove no more used ThreadViewer prop : messageListInitialScrollTop
- Remove no more used ChatWindow prop : threadInitialScrollTop
- Rename ThreadViewer field threadCacheInitialPosition to
threadCacheInitialScrollPosition
- Use the scroll position to set message list scroll on mounted
- Fix old test which was not simulating correctly home menu show
- Add tests to check that scroll position is correctly saved even if
ChatWindow is folded
- Fix traceback when showing/hiding home menu with a folded chat window
task-2285691
closes odoo/odoo#54198
X-original-commit: 31123a94c156424b3962fe4aebc3cc60a7a89223
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/thread_viewer/thread_viewer.js')
| -rw-r--r-- | addons/mail/static/src/components/thread_viewer/thread_viewer.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/addons/mail/static/src/components/thread_viewer/thread_viewer.js b/addons/mail/static/src/components/thread_viewer/thread_viewer.js index a21aa54efb9..8e8f8f14dbb 100644 --- a/addons/mail/static/src/components/thread_viewer/thread_viewer.js +++ b/addons/mail/static/src/components/thread_viewer/thread_viewer.js @@ -171,18 +171,6 @@ Object.assign(ThreadViewer, { haveMessagesAuthorRedirect: Boolean, haveMessagesMarkAsReadIcon: Boolean, haveMessagesReplyIcon: Boolean, - /** - * Set the initial scroll position of message list on mount. Note that - * this prop is not directly passed to message list as props because - * it may compute scroll top without composer, and then composer may alter - * them on mount. To solve this issue, thread handles setting initial scroll - * positions, so that this is always done after composer has been mounted. - * (child `mounted()` are called before parent `mounted()`) - */ - messageListInitialScrollTop: { - type: Number, - optional: true - }, order: { type: String, validate: prop => ['asc', 'desc'].includes(prop), |
