-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Reactivity broken when store values used in both style attributes & style: directives #9185
Comments
ivan-lednev
referenced
this issue
in ivan-lednev/obsidian-day-planner
Sep 7, 2023
There are issues in svelte with cascading dependencies in reactive declarations, from what I understand. Since `background color` relies on `$store.timelineColored`, having `textColor` rely on both seemed to cause issues. Removing the direct dependency of the store works, anyway.
dummdidumm
pushed a commit
that referenced
this issue
Sep 20, 2023
… style directive is updated via an object prop. fixes #9185 (#9187) fixes #9185. I narrowed down the issue to the bug surfacing when we use object properties to update style attributes and directives. This fix removes the size check (because a single object will be of size 1 but can affect n attributes/directives via its properties). In addition, the order of the OR is switched as the earlier condition has some reactive assignments which are not run in the current order when style_changed_var is truthy.
kelvinsjk
added a commit
to kelvinsjk/svelte
that referenced
this issue
Oct 19, 2023
… style directive is updated via an object prop. fixes sveltejs#9185 (sveltejs#9187) fixes sveltejs#9185. I narrowed down the issue to the bug surfacing when we use object properties to update style attributes and directives. This fix removes the size check (because a single object will be of size 1 but can affect n attributes/directives via its properties). In addition, the order of the OR is switched as the earlier condition has some reactive assignments which are not run in the current order when style_changed_var is truthy.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Take a look at the sandbox:
https://svelte.dev/repl/3806195fc2924034a9175a8d38dedc87?version=4.2.0
style
attribute, another in astyle:
directivestyle:
Expected:
Actual:
style:
Reproduction
https://svelte.dev/repl/3806195fc2924034a9175a8d38dedc87?version=4.2.0
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: