Skip to content
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

[link preview] fix content showing up at top left after remounting trigger #1053

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

anatolzak
Copy link
Contributor

@anatolzak anatolzak commented Mar 4, 2024

closes #1060

setting activeTrigger in trigger action (when trigger is mounted) instead of in safeOnMount. This makes sure that we always have a reference to the up-to-date trigger every time a new trigger mounts. Currently, if you just unmount the trigger and remount it, we have a stale activeTrigger which breaks the behavior of the component as seen in the mentioned issue above

Before

Screen.Recording.2024-03-05.at.1.40.20.PM.mov

After

Screen.Recording.2024-03-05.at.2.44.10.PM.mov

Copy link

changeset-bot bot commented Mar 4, 2024

🦋 Changeset detected

Latest commit: 1b78ce2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@melt-ui/svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@anatolzak anatolzak changed the title refactor link preview [link preview] fix content showing up at top left after remounting trigger Mar 5, 2024
@TGlide TGlide merged commit 37d84c3 into melt-ui:develop Mar 26, 2024
4 of 5 checks passed
@github-actions github-actions bot mentioned this pull request Mar 26, 2024
@anatolzak anatolzak deleted the refactor/link-preview branch March 27, 2024 17:10
lolcabanon pushed a commit to lolcabanon/melt-ui that referenced this pull request Apr 20, 2024
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.

[Link Preview] Lost Anchor After Remounting Trigger
2 participants