-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chat "scrolls up" right after switching to it, because images load and shift height #4404
Comments
Turns out this was introduced recently, in #4315 |
Closes #4404. The bug was introduced in db83279. Prior to that all attachments had a fixed height of 200px. This should also eliminate layout shifting when scrolling the chat, and when new messages arrive. An alternative solution that would still have layout shifting, but at least keep the chat "anchored" to bottom would be #3753 (comment), but it's not supported well by browsers.
Closes #4404. The bug was introduced in db83279. Prior to that all attachments had a fixed height of 200px. This should also eliminate layout shifting when scrolling the chat, and when new messages arrive. An alternative solution that would still have layout shifting, but at least keep the chat "anchored" to bottom would be #3753 (comment), but it's not supported well by browsers. Co-authored-by: Max Philippov <[email protected]>
Closes #4404. The bug was introduced in db83279. Prior to that all attachments had a fixed height of 200px. This should also eliminate layout shifting when scrolling the chat, and when new messages arrive. An alternative solution that would still have layout shifting, but at least keep the chat "anchored" to bottom would be #3753 (comment), but it's not supported well by browsers. Co-authored-by: Max Philippov <[email protected]>
Ok, looks like setting either I think we need a different approach, perhaps utilizing the Completely disregarding actual message size and only looking at its aspect ratio is probably not the way to go for tiny images. We should think in terms of "we need to set the height and width of the image, and not rely on the browser to figure out the dimensions based on the image's intrinsic size. Also, looking at Signal's implementation could be worth it. |
Is this still an issue with current main for anyone? |
This is a follow-up to #4407. This partially addresses #4404. The bug was introduced in #3999. Pior to that we used to have fixed width on quoted images as well. This commmit practically reverts that MR, but also adds `object-fit` and `object-position`, and is now in line with message attachment images.
This is a follow-up to #4407. This partially addresses #4404. The bug was introduced in #3999. Pior to that we used to have fixed width on quoted images as well. This commmit practically reverts that MR, but also adds `object-fit` and `object-position`, and is now in line with message attachment images.
This is a follow-up to #4407. This partially addresses #4404. The bug was introduced in #3999. Pior to that we used to have fixed width on quoted images as well. This commmit practically reverts that MR, but also adds `object-fit` and `object-position`, and is now in line with message attachment images.
@maxphilippov suggested what is likely to be the solution here #4315 (comment), with an extra comment from me #4315 (comment).
Update: the issue per se has been fixed in #4407, which sort of reverts the MR that introduced it (#4315), but we might want to come back to dynamic image sizes.
The text was updated successfully, but these errors were encountered: