Skip to content

Conversation

@lsouoliveira
Copy link
Contributor

Fix the avatar image placement on Firefox. Issue #259.

Before:
image

After:
image

@izaguirrejoe
Copy link

Ping

@ghost
Copy link

ghost commented Sep 30, 2025

As we talked in private, the problem is that AvatarFallback name is misleading, in the current code it isn't a fallback, it's just a element behind/above another element. I think we should implement a proper fallback behavior here using native HTML events (eg. onerror) and Stimulus controllers.

This solution doesn't fix the problem entirely, eg.:

Avatar do
  AvatarImage(src: "wrong-url", alt: "joeldrapper")
  AvatarFallback { "JD" }
end

This keeps breaking even with this PR.

@lsouoliveira
Copy link
Contributor Author

I'm closing this PR for now. As Stephann suggested, a good next step would be to handle image loading errors and display the fallback dynamically. Someone else can pick this up and continue from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants