Ask A Question

Notifications

You’re not receiving notifications from this thread.

From the active cable chatroom series how to I fix the size of the chatroom and scroll

John A. Cogan asked in Javascript

I have implemented the chatroom but I want the chatroom area to be fixed and for the user to be able to scroll back through the messages.
How can I add scrolling? I have tried added it to the panel the contains the chat but it is ignored? Any ideas?

Reply

I know Slack uses flexbox to do their layout. Something like this codepen: http://codepen.io/tutsplus/pen/XJexGg

Scrolling should be automatic if you have enough messages in the view. You can also force the scroll bar by adding overflow-y: scroll.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,969+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.