[FIX] Room scrolling to top after returns to a opened room (#19945)

pull/19962/head^2
Guilherme Gazzo 4 years ago committed by GitHub
parent 7382940454
commit eb9d5755c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/ui-utils/client/lib/openRoom.js

@ -103,7 +103,7 @@ export const openRoom = async function(type, name) {
const [mainNode, roomDom] = await replaceCenterDomBy(() => RoomManager.getDomOfRoom(type + name, room._id, roomTypes.getConfig(type).mainTemplate));
if (mainNode) {
if (roomDom.classList.contains('room-container .messages-box > .wrapper')) {
if (roomDom.classList.contains('.room-container .messages-box > .wrapper')) {
roomDom.querySelector('.messages-box > .wrapper').scrollTop = roomDom.oldScrollTop;
}
}

Loading…
Cancel
Save