react-slack-clone
react-slack-clone copied to clipboard
Bug. Scrollbar does NOT update when images are present
I just noticed an issue. If you post an image the scrollbar position is not updating. Does not synch to the bottom. This issue is not present with regular text messages.
What does it do that with images only? What would be the possible fix for this behavior? @lukejacksonn
Thanks!
Hey! Yes this is a known issue.. so the problem is how to know when to scroll (that is, not when the images has been appended to the DOM but when the image been rendered in the list, loaded and taken shape). I played around for a long time trying to find a solution that works for all cases and ina ll browsers but really struggled!
Perhaps adding a call to this action https://github.com/pusher/react-slack-clone/blob/master/src/index.js#L150 inside an onload
function on these elements https://github.com/pusher/react-slack-clone/blob/master/src/components/Message/index.js#L25 might work out.. I'm sure I tried it but not can't remember now.