Code Monkey home page Code Monkey logo

Comments (6)

dummdidumm avatar dummdidumm commented on September 25, 2024 1

This is already fixed in the latest version of 5.0-next, make sure to update the version.

from svelte.

Serator avatar Serator commented on September 25, 2024 1

@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.

Serator avatar Serator commented on September 25, 2024

@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.

dummdidumm avatar dummdidumm commented on September 25, 2024

Does the bug even exist in Svelte 4?

from svelte.

Serator avatar Serator commented on September 25, 2024

@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, then 0. 🟢

from svelte.

Serator avatar Serator commented on September 25, 2024

@dummdidumm I found the issue again in my app. The example this time is a little more complicated:

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.