Git Product home page Git Product logo

Comments (5)

nzayatz14 avatar nzayatz14 commented on July 29, 2024

UPDATE: I was able to duplicate this behavior in this Storybook Example by setting the font-size on the body tag to 0.875rem

Screen Shot 2021-05-07 at 5 32 51 PM

ezgif com-gif-maker

from chat-ui-kit-react.

supersnager avatar supersnager commented on July 29, 2024

Hi @nzayatz14, thank you for the great research. I use Perfect scroll for scrolling and this issue has a long story here: https://github.com/mdbootstrap/perfect-scrollbar/issues/920

I thought I have finally resolved this problem, but it seems I have not :(
It's great that you have found how can it be reproduced. I will try to fight this.

Btw, the Perfect scrollbar has also some caveats with flexbox, so I'm working on an alternative scroll solution. It should be available in one of the next releases.

from chat-ui-kit-react.

nzayatz14 avatar nzayatz14 commented on July 29, 2024

Hey @supersnager, any updates on this?

from chat-ui-kit-react.

nzayatz14 avatar nzayatz14 commented on July 29, 2024

Hey @supersnager, I managed to find a work around for this until you get around to your scrolling rewrite.

Pull request can be found here.

Thanks,
Nick

from chat-ui-kit-react.

supersnager avatar supersnager commented on July 29, 2024

@nzayatz14 I have checked your solution but it unfortunately not works in the simplest test case.
What I checked?
I applied your fix, opened the Storybook, and set body font-size to 0.875rem like in your repro.

This not works because when the scroll event occurs the <MessageList /> component is not updated, so the code fixed by you is not executing.

But your work led me to some other ideas on how to deal with this issue.
IMO the problem still lies in the perfect scrollbar. It can be related to the toInt function which is often used there to get the pixel size from strings. Values passed to this function are from getBoundedClientRect and can be floating numbers, so they are truncated to an integer by parseInt. In some circumstances, this can lead to wrong size calculation.

Please be patient, I need to do more tests on different browsers and devices.

from chat-ui-kit-react.

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.