Skip to content

Conversation

@wuzihao051119
Copy link

Further fix for #18615.

See immich-app/ui#203.

In this PR, @immich/ui is updated to release.

onClose = async (...args: [StripValueIfOptional<K>]) => {
await unmount(modal);
resolve(args?.[0]);
setTimeout(() => resolve(args?.[0]), 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried but failed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You tried this?

await tick();
resolve(args?.[0]);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, no effect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tick is specific to svelte and has to deal with pending svelte ui updates & microtasks, which isn't what the cause of the problem is related to.

@alextran1502 alextran1502 merged commit 5302085 into main Jun 30, 2025
51 checks passed
@alextran1502 alextran1502 deleted the fix/modal-race-condition branch June 30, 2025 19:33
ollioddi pushed a commit to ollioddi/immich that referenced this pull request Aug 11, 2025
* fix(web): modal race condition

* fix: translation

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants