Giter Site home page Giter Site logo

Bug with scroll-behavior: smooth about autosize HOT 2 CLOSED

dev1z avatar dev1z commented on August 15, 2024
Bug with scroll-behavior: smooth

from autosize.

Comments (2)

ttsuru avatar ttsuru commented on August 15, 2024 1

Adding the following code solved the problem.
What about the idea of temporarily disabling smooth scrolling?

Beginning of resize() function

    const html = document.querySelector('html');
    html.style.scrollBehavior = "auto";

End of resize() function

html.style.scrollBehavior = null;

from autosize.

jackmoore avatar jackmoore commented on August 15, 2024

@dev1z Thanks, I left a comment. I doubt it's fixable if using smooth scrolling because of the approach that autosize takes to computing the height change. There are other approaches for getting the height calculation (such as having a mirror textarea element offscreen), but that would be a very different script than what Autosize currently is and isn't without its own, different, pitfalls. Sorry for the trouble.

from autosize.

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.