Skip to content

fix(web): profile image load - #2434

Merged
alextran1502 merged 1 commit into
mainfrom
fix/web-profile-image-load
May 13, 2023
Merged

alextran1502 merged 1 commit into
mainfrom
fix/web-profile-image-load

Conversation

@michelheusschen

Copy link
Copy Markdown
Collaborator

Loading the profile image in the navbar has a race condition on initial page load, when the image loads earlier than the JS hydration. When that happens the profile image won't be shown, because the on:load event has already fired.

To fix it, I've created the imageLoad action which additionally checks if the image was already loaded and then manually dispatches an event. The transition has been removed to reduce flickering when navigating between pages.

@vercel

vercel Bot commented May 13, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
immich ⬜️ Ignored (Inspect) May 13, 2023 1:16pm

@alextran1502
alextran1502 merged commit 15fa825 into main May 13, 2023
@alextran1502
alextran1502 deleted the fix/web-profile-image-load branch May 13, 2023 14:16
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.

2 participants