Commit d8aca8d
committed
[Bug Fix] Avatar: stop lazy-loading image so it is never stuck hidden
An uncached AvatarImage could get permanently stuck on the fallback. The
avatar controller hides a still-loading image with display:none (the
`hidden` class) so the fallback shows, but the image was rendered with
loading="lazy". Browsers never fetch a loading="lazy" image that
generates no box, so its `load` event never fired and showImage() was
never called — the image stayed hidden indefinitely. Cached images were
unaffected because they are already complete at connect().
Remove loading="lazy" so the image loads eagerly even while hidden; the
load/error handlers then reveal it. This matches shadcn/radix, which do
not lazy-load the avatar image.
Fixes #4151 parent d799b7a commit d8aca8d
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
22 | 36 | | |
0 commit comments