Comments (6)
This is already fixed in the latest version of 5.0-next, make sure to update the version.
from svelte.
@dummdidumm https://stackblitz.com/edit/vitejs-vite-f8dfha?file=src%2Froutes%2F%2Bpage.svelte - no, you're right, there is no bug in Svelte 4.
from svelte.
@dummdidumm Can you tell me if this change will be reflected in Svelte 4? If not, it might be worth mentioning it in #11400. Thanks!
from svelte.
Does the bug even exist in Svelte 4?
from svelte.
@dummdidumm But I found another related bug:
- Svelte 5 (runes) - initial value of the bound scrollY is
undefined
. 🔴 - Svelte 5 (no runes) - initial value of the bound scrollY is
undefined
. 🔴 - Svelte 4 - initial value of the bound scrollY is
undefined
, then0
. 🟢
from svelte.
@dummdidumm I found the issue again in my app. The example this time is a little more complicated:
- https://stackblitz.com/edit/vitejs-vite-3yda5w?file=src%2Froutes%2F%2Bpage.svelte - the problem is not consistently reproduced on StackBlitz.
Any deletion fixes the issue (e.g. if you remove class="relative grid overflow-clip"
/ <div bind:contentRect></div>
/ <svelte:window bind:scrollY />
/ scroll-behavior: smooth;
...).
Svelte 5.0.0-next.135 🟢 - when refreshing, the page scrolls smoothly from the beginning to the position where it was before the refresh.
iShot_2024-05-17_17.11.02.mp4
Svelte 5.0.0-next.136 🔴 - when refreshing, the page instantly scrolls to the beginning and stays in that position.
iShot_2024-05-17_17.13.59.mp4
from svelte.
Related Issues (20)
- Svelte v4 components under Svelte v5: Internals leaked through slot variables when defined in component HOT 8
- Svelte 5 - Relax Variable Naming Restrictions on $-Prefixed Variables HOT 8
- Svelte 5: Components in #if blocks don't trigger their $effect rune HOT 9
- False positive error: rune outside svelte HOT 1
- Bump all dependencies before final release
- Documentation Clarification for Rookies HOT 3
- Svelte 5 (5.0.0-next.167): Upgrading to the latest Svelte 5 breaks SvelteKit routing HOT 9
- Svelte 5: this type of directive is not valid on components HOT 8
- [Svelte 5] `{#if}` block with several reactive children does not re-render properly HOT 12
- Svelte 5 legacy: transition not conveyed using $$restProps and svelte:element HOT 1
- next.167 breaks <svelte:component> in development mode
- Sveltekit + Svelte 5: Navigating only loads the layout, not the page HOT 2
- Svelte 5: Mutating data in load fn stops page reactivity HOT 4
- Svelte 5: this type of directive is not valid on components HOT 4
- Svelte 5: Inaccurate Error Message HOT 1
- `batch` function to update multiple sources at once HOT 4
- Svelte 5 reporting invalid type error on Svelte 4 component using slot
- Make aria- dependencies optional HOT 9
- Svelte 5: problems unmounting elements from the dom inside an each block HOT 5
- next.168 development mode and component snippets inside loop HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte.