simplebar icon indicating copy to clipboard operation
simplebar copied to clipboard

fix(core): On mouse pointer click move the scrollbar to correct position

Open mlipovaca opened this issue 1 year ago • 4 comments

Issue: Scrollbar is not moving to mouse position when clicked on the track.

What is done to fix it: Scrollbar is now moving by the calculation to specific (exact) mouse position when clicked on the track.

mlipovaca avatar Apr 13 '23 15:04 mlipovaca

Please if you can review it @Grsmto

mlipovaca avatar Apr 14 '23 22:04 mlipovaca

Hi @mlipovaca thanks for your contribution. The default behaviour on most browsers seems to be that it does not scroll where the user click but rather scroll down 1 viewport height, which is the behaviour of SimpleBar at the moment. One difference is that on the default scrollbar you can long press to scroll more (not supported by SimpleBar but could be). So I think we want to stick to the default behaviour as much as possible. Do you have any example of the behaviour you are describing and how you came up to want it that way? Thanks.

Grsmto avatar Apr 15 '23 16:04 Grsmto

Hi @Grsmto, thanks for the reply. Here're the differences when you "hold" the click on the navigation bar track and on default browser, it'll keep scrolling until it reaches it, but on simplebar it moves only once and that's it.

Reference:

  1. Default browser - https://chicksgold.gyazo.com/c423973d0689bebe71beeef1a5d98c5c
  2. Simplebar browser - https://chicksgold.gyazo.com/aec8fa411a33f42af2f74ce66dfb12f4

mlipovaca avatar Apr 17 '23 13:04 mlipovaca

Any words on this @Grsmto ?

mlipovaca avatar Apr 22 '23 01:04 mlipovaca