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

fix(toolbar-menu): remove redundant menu offset for Svelte 5 compatibility #2047

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Nov 10, 2024

Fixes #2040

The $: if (menuRef) menuRef.style.top = "100%"; statement is causing an infinite update loop.

Setting style causes menuRef to update. Wrapped in a reactive statement, this produces an infinite update error in Svelte 5.

I looked up the Git blame for this line (#369). Historically, it seems this line was used for offsetting the menu position. However, OverflowMenu now manually handles this offset based on the button height, so this statement is redundant.

@metonym metonym merged commit 7e17394 into master Nov 10, 2024
3 checks passed
@metonym metonym deleted the fix-toolbarmenu-reactivity branch November 10, 2024 19:50
@metonym
Copy link
Collaborator Author

metonym commented Nov 20, 2024

Released in v0.86.0

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.

[Svelte 5] ToolbarMenu causes effect_update_depth_exceeded error when menu is open
1 participant