Skip to content

Commit

Permalink
fix(meteor): Scroll position is lost when loading older messages (Roc…
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored Jun 13, 2023
1 parent 9160c21 commit 40d7f79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-mails-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fix(meteor): Scroll position is lost when loading older messages
2 changes: 1 addition & 1 deletion apps/meteor/app/ui-utils/client/lib/RoomHistoryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class RoomHistoryManagerClass extends Emitter {
room.unreadNotLoaded.set(result.unreadNotLoaded);
room.firstUnread.set(result.firstUnread);

const wrapper = await waitForElement('.messages-box .wrapper');
const wrapper = await waitForElement('.messages-box .wrapper .rc-scrollbars-view');

if (wrapper) {
previousHeight = wrapper.scrollHeight;
Expand Down

0 comments on commit 40d7f79

Please sign in to comment.