From 3170e2aa89c65058449e5c86fc6d483e6c238532 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 29 May 2019 16:31:07 -0300 Subject: [PATCH] [FIX] Load messages after disconnect and message box scroll missing (#14668) --- app/ui-message/client/messageBox/messageBoxAutogrow.js | 4 ++-- app/ui-utils/client/lib/RoomManager.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/ui-message/client/messageBox/messageBoxAutogrow.js b/app/ui-message/client/messageBox/messageBoxAutogrow.js index 99e6cf8006a2..06348dc729b7 100644 --- a/app/ui-message/client/messageBox/messageBoxAutogrow.js +++ b/app/ui-message/client/messageBox/messageBoxAutogrow.js @@ -34,7 +34,7 @@ export const setupAutogrow = (textarea: HTMLTextAreaElement, shadow: HTMLDivElem return true; } - const shadowText = text.replace(//g, '>') .replace(/&/g, '&') .replace(/\n$/, '
 ') @@ -56,7 +56,7 @@ export const setupAutogrow = (textarea: HTMLTextAreaElement, shadow: HTMLDivElem lastHeight = height; - const overflow = height === maxHeight ? 'hidden' : ''; + const overflow = height < maxHeight ? 'hidden' : ''; if (height < maxHeight) { textLenght = text.length; diff --git a/app/ui-utils/client/lib/RoomManager.js b/app/ui-utils/client/lib/RoomManager.js index da0baff35596..30bcda015e99 100644 --- a/app/ui-utils/client/lib/RoomManager.js +++ b/app/ui-utils/client/lib/RoomManager.js @@ -10,13 +10,14 @@ import { fireGlobalEvent } from './fireGlobalEvent'; import { upsertMessage, RoomHistoryManager } from './RoomHistoryManager'; import { mainReady } from './mainReady'; import { roomTypes } from '../../../utils'; -import { call } from '../..'; import { callbacks } from '../../../callbacks'; import { Notifications } from '../../../notifications'; import { CachedChatRoom, ChatMessage, ChatSubscription, CachedChatSubscription } from '../../../models'; import { CachedCollectionManager } from '../../../ui-cached-collection'; import { getConfig } from '../config'; +import { call } from '..'; + const maxRoomsOpen = parseInt(getConfig('maxRoomsOpen')) || 5;