react-slack-clone icon indicating copy to clipboard operation
react-slack-clone copied to clipboard

Bug. Scrollbar does NOT update when images are present

Open neuropass opened this issue 6 years ago • 1 comments

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!

neuropass avatar Oct 06 '18 15:10 neuropass

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.

lukejacksonn avatar Oct 10 '18 08:10 lukejacksonn