-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
When a style is set on a component and the style of the element is being modified by resize (which sets width/height), those style changes can be lost on component update due to another property, even though the passed in style did not actually change (e.g. if it is set to be a constant value).
(A workaround is to export a style property explicitly, so it is not part of the spread attributes.)
Reproduction
<!-- TextArea.svelte -->
<script>
export let value = '';
</script>
<textarea bind:value {...$$restProps} /><TextArea bind:value={someValue} style="width: 100%" />Steps:
- Resize textarea
- Type into textarea
Logs
No response
System Info
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
Memory: 7.14 GB / 31.69 GB
Binaries:
Node: 18.16.0 - ~\AppData\Local\Programs\NodeJS\node.EXE
Yarn: 1.22.19 - ~\AppData\Local\Programs\NodeJS\yarn.CMD
npm: 9.5.1 - ~\AppData\Local\Programs\NodeJS\npm.CMD
Browsers:
Edge: Spartan (44.22000.120.0), Chromium (115.0.1901.203)
Internet Explorer: 11.0.22000.120Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels