Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need an additional scrollToBottom on incoming messages #2

Open
davedgd opened this issue Jul 9, 2021 · 9 comments
Open

need an additional scrollToBottom on incoming messages #2

davedgd opened this issue Jul 9, 2021 · 9 comments

Comments

@davedgd
Copy link

davedgd commented Jul 9, 2021

Thanks for putting this together -- it's awesome!

One annoyance I've noticed: When sending messages, the scrollToBottom calls successfully scroll the div containing messages to the bottom. However, this is not true when you're in an existing chat and receive messages from the other party. For instance:

example

It would be great if incoming messages would trigger a scrollToBottom event as well. I haven't had the time to dig into the code to put together a PR yet, but I imagine this is a relatively simple fix.

@tagavari
Copy link
Member

Thanks for opening this issue!

AirMessage for web doesn't call scrollToBottom() for incoming messages, since if the conversation list is already scrolled to the bottom, the browser should scroll down to reveal any newly added items automatically:

screen.mov

Is this not the behaviour you're experiencing?

@davedgd
Copy link
Author

davedgd commented Jul 16, 2021

Hi @tagavari!

You're very welcome, and thanks for the reply!

I think I need to clarify my original post: I do experience the behavior you showed in your movie most of the time, but occasionally not.

Sometimes -- perhaps when the airmessage tab has been out of focus, but I'm still confirming -- received messages, along with the first outbound message, will fail to scroll to the bottom as expected.

I'm not able to recreate it at the moment, but I will try to create a video of it once I can show how to reproduce.

EDIT: Here's a demonstration of the issue with incoming messages. It can also occur with outbound messages sent very quickly (before the server has time to update it would seem). Notice in the clip, I'm receiving inbound messages (three in this case), and the scrollbar is moving, but the initial message is cut off, along with all subsequent ones.

To create the situation, I switched between two conversations and also backgrounded the tab briefly (I'm not yet 100% sure what causes it, but I encounter it pretty frequently).

demo.mp4

@Geczy
Copy link

Geczy commented Jul 23, 2022

i fixed this issue here: Geczy@c8b26ec feel free to cherry pick !

@tagavari
Copy link
Member

@Geczy Thanks a lot! I tried this out, but it seems to trigger even if I've scrolled far up in the conversation. Am I missing something?

@Geczy
Copy link

Geczy commented Jul 23, 2022

@Geczy Thanks a lot! I tried this out, but it seems to trigger even if I've scrolled far up in the conversation. Am I missing something?

can you share the branch you tried this in?

nvm i can see this happening in mine too, will think of a fix

@Geczy
Copy link

Geczy commented Jul 23, 2022

okay this commit fixes it for sure Geczy@5856eb0

@davedgd
Copy link
Author

davedgd commented Jul 23, 2022

okay this commit fixes it for sure Geczy@5856eb0

Thank you both for working on this!

@tagavari
Copy link
Member

Thank you @Geczy, I will try this out later this week!

@dyipon
Copy link

dyipon commented Sep 15, 2022

hi,

I've tried that function, but images are downloaded again-and-again every time I click on the chat. The loading takes 8-10 seconds, and sometimes I get 'Couldn't load this conversation'.
It this the normal behaviour? Or should I deploy this repo for myself, and it would be faster?:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants