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

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?

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.

Join the discussion

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.