-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
bind:clientHeight not updating as expected #7317
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
Comments
Experiencing the same issue, any fixes so far? |
I added a messy fix to the repl, it fakes an empty element with the same height/content. It works for some use cases but not all. No other fixes to this as far as I know.
|
Adding |
As a ref. this was the workaround and info provided on discord by rmunn (not an easy setup, but it is a solid fix if you do not require IE support)
|
Svelte 5 uses resize observers, which work more reliably — closing |
Describe the bug
On load the value is often set to zero while the element does have a height, the behavior seems to be random. The REPL below almost always shows 0 for me, outside of the REPL in a project setup it is more hit and miss.
Seems to be related to:
#7099
The issue is confirmed by two others on discord:
https://discord.com/channels/457912077277855764/939868205869072444/946476600365568001
Reproduction
https://svelte.dev/repl/7b16f85496e24bca88c198753f005a61?version=3.46.4
Logs
No response
System Info
System: OS: Linux 5.13 Manjaro Linux CPU: (16) x64 AMD Ryzen 7 1700X Eight-Core Processor Memory: 3.11 GB / 15.56 GB Container: Yes Shell: 5.1.16 - /bin/bash Binaries: Node: 17.3.0 - /usr/bin/node Yarn: 1.22.17 - /usr/bin/yarn npm: 8.3.1 - /usr/bin/npm Browsers: Brave Browser: 97.1.34.81 Chromium: 97.0.4692.99 npmPackages: svelte: ^3.44.0 => 3.46.3 svelte repl: 3.46.4
Severity
annoyance
The text was updated successfully, but these errors were encountered: