-
Notifications
You must be signed in to change notification settings - Fork 72
web client stopped scrolling down automatically when new message gets posted #35
Comments
Same issue too for me. Any possilbe reasons to look for? |
See anything in the javascript console or in your apps console? |
No errors or warning in Console..
…On Tue 26 Jun, 2018, 5:53 PM Peter Swimm, ***@***.***> wrote:
See anything in the javascript console or in your apps console?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBx5xFEJaW9iu4EF6AP-NQpDPUwvEiSks5uAie2gaJpZM4TkOyF>
.
|
In the botkit console AND your browsers javascript console? |
I have confirmed in both the console. No errors of any type.
…On Tue 26 Jun, 2018, 7:32 PM Peter Swimm, ***@***.***> wrote:
In the botkit console AND your browsers javascript console?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBx57ubCk9-5QxC1ZhG1YjCZqda6fLQks5uAj70gaJpZM4TkOyF>
.
|
Thijs is a known issue - it is a quirk of the way flex layout works in CSS. It will only auto-scroll if the user does not scroll back up from the bottom of the element. The solution is to add a scroll-to-bottom function in the client code that is called whenever a new message arrives. |
Thanks for the heads-up. Can your please share some code on how to do that?
I can test and make a pull request.
…On Tue 26 Jun, 2018, 8:53 PM Ben Brown, ***@***.***> wrote:
Thijs is a known issue - it is a quirk of the way flex layout works in
CSS. It will only auto-scroll if the user does not scroll back up from the
bottom of the element.
The solution is to add a scroll-to-bottom function in the client code that
is called whenever a new message arrives.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBx56uuxnOyPJWOoQSOhk3e4uKTh7xBks5uAlHegaJpZM4TkOyF>
.
|
Sorry. I am not using botkit now.
Thanks,
Purusothaman Ramanujam
…On Thu, Sep 27, 2018, 2:31 AM Patricia Goldweic ***@***.***> wrote:
@Purus <https://github.com/Purus>, have you been able to come up with
this piece of code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBx51zah2WJpUbJdorZ_e0J86ErId4iks5ue-sfgaJpZM4TkOyF>
.
|
Use this function wherever message is added // add this in messanger
scrollBottom: function() {
this.message_list.scrollTop = this.message_list.scrollHeight
}, |
Thanks for replying both @Purus and @gagan-bansal!. |
The above solution does not seem to work for me (note: I'm using botkit-starter-web version 0.0.1,). I had to do the scrolling based on the 'section' tag that contains the 'message_list', and therefore gave it an id (e.g. 'botScrollingSection'). My scrollBottom function currently looks like the following (thanks to some relevant pointers I found online):
I am calling this function twice from within the 'renderMessage' in client.js (as the first line and also the last line in this function).
The combination of the above seems to be working for me. Thanks again to those who have responded to this thread. BTW, this seems to be taking care also of the issue with scrolling in Firefox (and is the reason why I needed to do the style changes in styles.css) |
Hi @pgoldweic Thanks for the solution. If we remove display:flex, the incoming messages are starting from top instead of bottom during start of the conversation. |
Hi All, Fixed the issue. Added in _chat.scss Added scrollBottom method in client.js
|
Hi @rajasekaran-k , |
@pgoldweic thanks very much for your solution. Helped get my bot working on Firefox, finally! One thing I'm still having trouble with is to have the first few messages in a conversation attach themselves to the bottom of the botScrollingSection. Any ideas for that? |
I have your chat widget embedded in a web page, and after working as expected for a couple of days, it has now decided to stop scrolling automatically whenever a message gets posted (this is a conversation with a unique user, me, while testing). Any ideas what could be causing that? And, is this a bug that needs fixing? (BTW, I see no relevant errors in the console).
A small update on this. I wonder if this started happening when I started 'identifying' the user in my code (that is, using Botkit.identifyUser(user) after the initial call). Just an idea though, I haven't noticed anything else changing.
The text was updated successfully, but these errors were encountered: