diff --git a/client/components/LinkPreview.vue b/client/components/LinkPreview.vue index 30c420d2..7c15ed43 100644 --- a/client/components/LinkPreview.vue +++ b/client/components/LinkPreview.vue @@ -193,6 +193,7 @@ export default { }, onMoreClick() { this.isContentShown = !this.isContentShown; + this.keepScrollPosition(); }, }, }; diff --git a/client/components/MessageList.vue b/client/components/MessageList.vue index 55c7df86..e97fdac1 100644 --- a/client/components/MessageList.vue +++ b/client/components/MessageList.vue @@ -224,6 +224,8 @@ export default { clipboard(this.$el); }, onLinkPreviewToggle(preview, message) { + this.keepScrollPosition(); + // Tell the server we're toggling so it remembers at page reload // TODO Avoid sending many single events when using `/collapse` or `/expand` // See https://github.com/thelounge/thelounge/issues/1377