Skip to content

Conversation

@backportbot-nextcloud
Copy link

backport of #2220

When the new messsage field is cleaned after successfully sending a
message its height changes, so the stored height needs to be updated.
Otherwise when a keydown event is received again on the new message
field the old height would be used for the calculations, which would
cause the chat view to be wrongly scrolled after sending a message with
several lines.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Looping through the last messages on arrow up/down may change the height
of the new message field (as the last messages may contain different
numbers of lines), so this needs to be done before handling height
changes in the new message field for the chat view to be properly
scrolled.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the chat view is resized the new messsage field height may change,
so the stored height needs to be updated. Otherwise when a keydown event
is received again on the new message field the old height would be used
for the calculations, which would cause the chat view to be wrongly
scrolled if a message is currently in the new message field and its
height changed due to the resize.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants